/* ═══════════════════════════════════════════════════════════════ */
/* AVIATOR GAME — High-Fidelity "Production" Stylesheet          */
/* ═══════════════════════════════════════════════════════════════ */

/* ── CSS VARIABLES (Refined Spribe Palette) ────────────────── */
:root {
  --bg-app: #0e1621;
  /* Deepest navy-black */
  --bg-panel: #1b2024;
  /* Slightly lighter panel bg */
  --bg-header: #0d0e10;
  --bg-input: #0b0c0d;
  /* Recessed input bg */

  --green-primary: #28a909;
  --green-gradient: linear-gradient(180deg, #42c766 0%, #28a909 100%);
  --green-shadow: rgba(40, 169, 9, 0.4);

  --red-primary: #e50539;
  --red-gradient: linear-gradient(180deg, #ff4d6d 0%, #e50539 100%);
  --red-shadow: rgba(229, 5, 57, 0.4);

  --orange-primary: #ff8c00;
  --orange-gradient: linear-gradient(180deg, #ffa94d 0%, #ff8c00 100%);
  --orange-shadow: rgba(255, 140, 0, 0.4);

  --text-primary: #ffffff;
  --text-secondary: #9ea0a3;
  --text-muted: #5e6266;

  --border-glass: rgba(255, 255, 255, 0.08);
  --shadow-panel: 0 4px 20px rgba(0, 0, 0, 0.4);

  --radius-pill: 100px;
  --radius-card: 12px;

  --header-height: 54px;
  --sidebar-width: 280px;
  --header-bg: #0d0e10;
}

/* ── RESET & BASE ──────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input {
  font-family: inherit;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
}

/* ── Partner Bar (Betway-style top bar) ─────────────────── */
.partner-bar {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--partner-bar-bg, #000000);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  z-index: 101;
  transition: background 0.3s ease;
}

.partner-bar-left,
.partner-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Menu button */
.partner-menu-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.partner-menu-btn:hover {
  color: #fff;
}

.partner-menu-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: inherit;
  text-transform: uppercase;
}

/* Partner logo */
.partner-logo-wrap {
  height: 32px;
  display: flex;
  align-items: center;
}

.partner-logo-wrap .partner-logo-img {
  height: 100%;
  width: auto;
  max-height: 32px;
  max-width: 140px;
  object-fit: contain;
  filter: brightness(1.1);
}

/* Info pills */
.partner-info-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.pip-label {
  color: #999;
  font-weight: 500;
}

.pip-value {
  color: #fff;
  font-weight: 600;
}

/* Deposit button in partner bar */
.partner-deposit-btn {
  background: var(--deposit-btn-bg, linear-gradient(180deg, #f5a623 0%, #e8960e 100%));
  color: #000;
  border: none;
  padding: 6px 18px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px var(--deposit-btn-shadow, rgba(245, 166, 35, 0.25));
}

.partner-deposit-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Profile icon */
.partner-profile-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.partner-profile-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ── Toggle Logic for Castlebet vs New Standard ─────────────── */
.legacy-elements,
.legacy-nav,
.legacy-only {
  display: none !important;
}

body.is-castlebet .legacy-elements,
body.is-castlebet .legacy-nav,
body.is-castlebet .legacy-only {
  display: flex !important;
}

body.is-castlebet .new-standard-elements,
body.is-castlebet .new-nav,
body.is-castlebet .new-standard-only {
  display: none !important;
}

/* Base states for New Standard */
.new-standard-elements,
.new-nav {
  display: flex;
}

/* ── New Standard Bar 1 Styles ──────────────────────────────── */
.new-standard-elements {
  align-items: center;
  gap: 12px;
}

.new-profile-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding-right: 8px;
}

.new-profile-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #28a909;
  display: flex;
  align-items: center;
  justify-content: center;
}

.new-profile-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.new-welcome-text {
  font-size: 0.65rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.1;
}

.new-username-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.new-deposit-btn {
  background: #4a90e2;
  /* Modern blue */
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: capitalize;
  margin: 0 4px;
}

.new-deposit-btn:hover {
  background: #3a7bc8;
}

.new-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.new-icon-btn:hover svg {
  stroke: #ccc;
}


/* ── Secondary Nav (Grey Bar) ───────────────────── */
.betway-nav-primary {
  width: 100%;
  height: 52px;
  background: var(--nav-primary-bg, #333333);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  position: relative;
  flex-shrink: 0;
  z-index: 100;
  transition: background 0.3s ease;
}

.nav-items-center {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: #cccccc;
  font-size: 0.65rem;
  font-weight: 500;
  height: 100%;
  padding: 0 8px;
  transition: all 0.2s;
}

.nav-item:hover {
  color: #ffffff;
}

.nav-item svg {
  stroke: currentColor;
  fill: none;
}

/* EXCEPT for Aviator icon which we force to red fill */
.nav-item.aviator-item svg {
  stroke: none;
  fill: #e50539;
}

.nav-item.active {
  color: #ffffff;
  border-bottom: 2px solid #ffffff;
}

.nav-icons-right {
  position: absolute;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-icon-btn:hover svg {
  stroke: #ffffff;
}

/* ── Tertiary Nav (Black Bar) ───────────────────── */
.betway-nav-secondary {
  width: 100%;
  height: 38px;
  background: var(--nav-secondary-bg, #000000);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  z-index: 100;
  transition: background 0.3s ease;
}

.nav-sec-left {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 12px;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  margin-right: 16px;
}

.nav-sec-scroll {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-sec-scroll::-webkit-scrollbar {
  display: none;
}

.sec-item {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #aaaaaa;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.sec-item:hover {
  color: #ffffff;
}

.sec-item.active {
  background: #2a3d3c;
  color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════ */
/* LAYOUT STRUCTURE                                            */
/* ═══════════════════════════════════════════════════════════ */
.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  background: radial-gradient(circle at 50% 30%, #16202c 0%, #0e1621 80%);
}

/* ── Header (Minimalist Top Bar) ─────────────────────────── */
.header-bar {
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Header Logo — properly contained */
.header-logo-crop {
  overflow: hidden;
  height: 46px;
  display: flex;
  align-items: center;
  max-width: 220px;
}

.header-logo-img {
  height: 100%;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  object-position: left center;
}

/* ── User Profile Chip ──────────────────────────────────── */
.user-profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-glass);
}

.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #28a909, #1e8a07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.profile-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.profile-welcome {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 400;
}

.profile-name {
  font-size: 0.75rem;
  color: #fff;
  font-weight: 600;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Deposit Button (Hidden in 4th Banner to match Betway) ── */
.deposit-btn {
  display: none !important;
}

/* ── Dynamic Username (Replaces "How to play?") ───────────── */
.header-username {
  color: #aaaaaa;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  padding: 0 4px;
}

/* ── Header Balance (Inline Plain Text) ─────────────────── */
.header-balance {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  background: transparent;
  border: none;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-balance-amount {
  color: #ffffff;
  font-weight: 500;
}

.header-balance-currency {
  color: #aaaaaa;
  font-weight: 500;
}

/* Green balance override for New Standard */
body:not(.is-castlebet) .header-balance-amount {
  color: #28a909 !important;
  font-weight: 700 !important;
}

body:not(.is-castlebet) .header-balance-currency {
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* ── Header Icon Buttons (Grid & Burger) ────────────────── */
.header-icon-btn {
  background: #2a2a2a;
  border-radius: 4px;
  padding: 6px;
  border: 1px solid #333333;
  color: #aaaaaa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  height: 30px;
  width: 30px;
}

.header-icon-btn:hover {
  background: #333333;
  color: #ffffff;
}

/* ── Header Icon Buttons ────────────────────────────────── */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  position: relative;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ── Nav Bar ────────────────────────────────────────────── */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: 40px;
  background: linear-gradient(180deg, #1a2332, #141c28);
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
  overflow: visible;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: lowercase;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.nav-link svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.nav-balance {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-glass);
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
}

.nav-balance-amount {
  color: #fff;
}

.nav-balance-currency {
  color: var(--green-primary);
  font-weight: 700;
}

/* ── Deposit Modal ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: linear-gradient(180deg, #1b2024, #14181c);
  border: 1px solid rgba(255, 140, 0, 0.3);
  border-radius: 16px;
  width: 90%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  width: auto;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-body label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.modal-body input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}

.modal-body input:focus {
  border-color: rgba(255, 140, 0, 0.5);
}

.deposit-quick-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.deposit-quick {
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.deposit-quick:hover {
  background: rgba(255, 140, 0, 0.15);
  border-color: rgba(255, 140, 0, 0.4);
  color: #fff;
}

.deposit-confirm-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(180deg, #ff8c00, #e07600);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(255, 140, 0, 0.3);
  transition: all 0.2s;
  margin-top: 4px;
}

.deposit-confirm-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════ */
/* SIDEBAR (Desktop Left)                                      */
/* ═══════════════════════════════════════════════════════════ */
.left-sidebar {
  width: var(--sidebar-width);
  background: rgba(20, 21, 22, 0.95);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  z-index: 90;
  backdrop-filter: blur(20px);
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-glass);
}

.sidebar-tabs {
  display: flex;
  background: #0b0c0d;
  padding: 4px;
  border-radius: var(--radius-pill);
}

.sidebar-tab {
  flex: 1;
  padding: 6px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: all 0.2s;
}

.sidebar-tab.active {
  background: #2c2d30;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bet-list-header {
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.6fr 1fr;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.2);
}

.bet-list-header .currency-label {
  text-transform: uppercase;
  font-weight: 400;
}

/* ── Bets Summary Block ─────────────────────────────── */
.bets-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.bets-summary-count {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bets-summary-count strong {
  color: #fff;
}

.bets-summary-prev {
  background: none;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.65rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
}

.bets-summary-prev:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.bet-list {
  flex: 1;
  overflow-y: auto;
}

.bet-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.6fr 1fr;
  gap: 4px;
  align-items: center;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.1s;
}

.bet-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.bet-row.cashed-out,
.bet-row.bet-won {
  background: rgba(40, 169, 9, 0.08);
}

.bet-row.bet-won .mult-val,
.bet-row.bet-won .win-val {
  color: #42c766;
}

.bet-row.bet-lost {
  background: rgba(220, 38, 38, 0.06);
  opacity: 0.6;
}

.bet-row.bet-lost .mult-val {
  color: #ef4444;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.user-info {
  flex: 1;
  margin-left: 10px;
}

.username {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.bet-val {
  font-size: 0.75rem;
  color: #fff;
  text-align: right;
}

.win-val {
  text-align: right;
  font-weight: 700;
  color: var(--green-primary);
  font-size: 0.8rem;
}

.mult-val {
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ── Sidebar Footer ─────────────────────────────────── */
.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border-glass);
  font-size: 0.65rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.sidebar-footer .provably-fair {
  position: static;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 1;
}

.spribe-powered {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.spribe-powered strong {
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════ */
/* MAIN GAME AREA                                              */
/* ═══════════════════════════════════════════════════════════ */
.game-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ── History Bar (Very Top, Full Width) ──────────────────── */
.history-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.25);
  scrollbar-width: none;
}

.history-bar::-webkit-scrollbar {
  display: none;
}

.history-pills {
  display: flex;
  flex-direction: row-reverse;
  gap: 15px;
  white-space: nowrap;
  padding-right: 10px;
}

.history-pill {
  padding: 3px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: var(--radius-pill);
  box-shadow: none;
  cursor: default;
  transition: opacity 0.2s;
}

.history-pill:hover {
  opacity: 0.7;
}

.history-pill.blue {
  color: #41b0ee;
  background: rgba(65, 176, 238, 0.15);
}

.history-pill.purple {
  color: #913ef8;
  background: rgba(145, 62, 248, 0.15);
}

.history-pill.pink {
  color: #c017b4;
  background: rgba(192, 23, 180, 0.15);
}

.history-pill.pill-new {
  animation: pillSlideIn 0.4s ease-out;
}

@keyframes pillSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px) scale(0.8);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ── Canvas Stage ────────────────────────────────────────── */
.canvas-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}



#gameCanvas {
  width: 100%;
  height: 100%;
}

/* Canvas Overlays */
/* Canvas Overlays */
/* (Waiting bar styles moved to end of file) */

.provably-fair {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.6;
  transition: opacity 0.2s;
}

.provably-fair:hover {
  opacity: 1;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════ */
/* BETTING CONTROLS — Betway Style                             */
/* ═══════════════════════════════════════════════════════════ */
.betting-panels {
  display: flex;
  gap: 8px;
  padding: 10px 16px 16px;
  background: var(--bg-app);
  justify-content: center;
  z-index: 90;
}

.bet-panel {
  flex: 1;
  max-width: 440px;
  background: linear-gradient(180deg, #1b2230, #161c26);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Panel Header: Bet / Auto Toggle ────────────────────── */
.panel-header {
  display: flex;
  justify-content: center;
  margin-bottom: 2px;
}

.toggle-pill {
  background: #0e1117;
  border-radius: var(--radius-pill);
  padding: 2px;
  display: inline-flex;
  width: 100%;
}

.toggle-opt {
  flex: 1;
  padding: 5px 0;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  text-align: center;
}

.toggle-opt.active {
  background: #2c3040;
  color: #fff;
}

.toggle-opt:hover:not(.active) {
  color: var(--text-secondary);
}

/* ── Panel Body: Split Column Layout ─────────────────────── */
.panel-body {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
}

.bet-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 45%;
  /* Left column width */
}

.input-block {
  display: flex;
  align-items: center;
  background: #0e1117;
  border-radius: 8px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 48px;
  width: 100%;
}

.stepper-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

.stepper-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.stepper-btn:active {
  transform: scale(0.93);
}

.amount-input {
  flex: 1;
  text-align: center;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  width: 100%;
  padding: 0;
  margin: 0;
  line-height: 48px;
  outline: none;
}

/* ── Main Action Button (BET / CASH OUT) ──────────────── */
.main-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.1s;
  position: relative;
  overflow: hidden;
  height: auto;
  min-height: 80px;
  line-height: 1.1;
}

.btn-status {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0.9;
  letter-spacing: 0.5px;
}

.btn-val {
  font-size: 1.05rem;
  font-weight: 800;
  margin-top: 1px;
}

.main-btn.btn-bet {
  background: linear-gradient(180deg, #66bd59 0%, #449e35 100%);
  box-shadow: 0 2px 0 #2e6b24;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.main-btn.btn-bet:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 8px rgba(40, 169, 9, 0.3);
}

.main-btn.btn-bet:active {
  filter: brightness(0.95);
  box-shadow: 0 2px 0 #2e6b24;
  transform: none;
}

.main-btn.btn-cancel {
  background: linear-gradient(180deg, #e50539, #c00430);
  box-shadow: 0 4px 14px rgba(229, 5, 57, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.main-btn.btn-cancel:hover {
  filter: brightness(1.1);
}

.main-btn.btn-cashout {
  background: linear-gradient(180deg, #ff8c00, #e07600);
  box-shadow: 0 0 20px rgba(255, 140, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: pulse-orange 1.5s infinite;
}

.main-btn:disabled,
.main-btn.disabled {
  background: #1e2230;
  color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

/* ── Quick Stakes Grid ──────────────────────────────────── */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.quick-btn {
  padding: 6px 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.1s;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ── Auto Options ─────────────────────────────────────── */
.auto-opts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.auto-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.toggle-switch {
  width: 32px;
  height: 18px;
  background: #3d4044;
  border-radius: 20px;
  position: relative;
  transition: 0.3s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  background: #9ea0a3;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked+.toggle-switch {
  background: var(--green-primary);
}

input:checked+.toggle-switch::after {
  transform: translateX(14px);
  background: #fff;
}

.toggle-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.auto-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
}

.auto-input {
  width: 40px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════ */
/* ANIMATIONS                                                  */
/* ═══════════════════════════════════════════════════════════ */
@keyframes pulse-orange {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(255, 140, 0, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 140, 0, 0);
  }
}

/* ── SIDEBAR CONTENT PANELS ────────────────────────────────── */

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.left-sidebar {
  display: flex;
  flex-direction: column;
}

/* ── STATISTICS PANEL ──────────────────────────────────────── */

.stats-panel {
  padding: 0 10px;
}

.stats-sub-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.stats-tab {
  flex: 1;
  padding: 5px 0;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stats-tab.active {
  background: var(--green-primary);
  color: #fff;
}

.stats-list {
  overflow-y: auto;
  max-height: 400px;
}

.stats-row {
  display: flex;
  align-items: center;
  padding: 7px 6px;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.74rem;
  gap: 8px;
}

.stats-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.stats-rank.gold {
  background: #ffd700;
  color: #000;
}

.stats-rank.silver {
  background: #c0c0c0;
  color: #000;
}

.stats-rank.bronze {
  background: #cd7f32;
  color: #000;
}

.stats-user {
  flex: 1;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-mult {
  color: var(--green-primary);
  font-weight: 700;
  min-width: 45px;
  text-align: right;
}

.stats-win {
  color: var(--text-secondary);
  min-width: 70px;
  text-align: right;
  font-weight: 500;
}

/* ── CHAT PANEL ────────────────────────────────────────────── */

.chat-panel {
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  height: 200px;
  min-height: 150px;
  flex-shrink: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-glass);
}

.chat-online {
  margin-left: auto;
  font-size: 0.6rem;
  color: var(--green-primary);
  font-weight: 400;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px;
  scroll-behavior: smooth;
}

.chat-msg {
  padding: 3px 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.chat-msg-user .chat-name {
  color: var(--green-primary) !important;
}

.chat-msg-system {
  color: #ffd700;
  font-size: 0.7rem;
  padding: 4px 6px;
  margin: 4px 0;
  background: rgba(255, 215, 0, 0.06);
  border-radius: 6px;
  border-left: 2px solid #ffd700;
}

.chat-name {
  color: #58a6ff;
  font-weight: 600;
  margin-right: 4px;
}

.chat-text {
  color: var(--text-primary);
  opacity: 0.85;
}

.chat-input-row {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  border-top: 1px solid var(--border-glass);
}

.chat-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 0.72rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: rgba(255, 255, 255, 0.2);
}

.chat-send-btn {
  background: var(--green-primary);
  border: none;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: opacity 0.2s;
}

.chat-send-btn:hover {
  opacity: 0.85;
}

/* ── RAIN BANNER ───────────────────────────────────────────── */

.rain-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin: 4px 8px;
  background: linear-gradient(135deg, rgba(0, 120, 255, 0.15), rgba(0, 200, 255, 0.1));
  border: 1px solid rgba(0, 150, 255, 0.3);
  border-radius: 10px;
  animation: rainGlow 1.5s ease-in-out infinite alternate;
}

@keyframes rainGlow {
  from {
    box-shadow: 0 0 6px rgba(0, 150, 255, 0.2);
  }

  to {
    box-shadow: 0 0 16px rgba(0, 150, 255, 0.4);
  }
}

.rain-icon {
  font-size: 1.3rem;
}

.rain-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
  color: #fff;
  line-height: 1.3;
}

.rain-text strong {
  color: #4dc9f6;
}

.rain-claim-btn {
  background: var(--green-gradient);
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  animation: rainPulse 0.8s ease-in-out infinite;
}

@keyframes rainPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

.rain-timer {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* ── AUTO-BET ACTIVE INDICATOR ─────────────────────────────── */

.bet-panel.auto-bet-active {
  border: 1px solid rgba(40, 169, 9, 0.4);
  box-shadow: 0 0 12px rgba(40, 169, 9, 0.15);
}

.bet-panel.auto-bet-active .toggle-opt[data-mode="auto"] {
  color: var(--green-primary);
}

/* ═══════════════════════════════════════════════════════════ */
/* WAITING SCREEN (Splash / Official Partners)                 */
/* ═══════════════════════════════════════════════════════════ */

.canvas-container {
  position: relative;
  /* Ensure absolute children are contained */
}

.waiting-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  /* Above canvas */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  /* Semi-transparent overlay to see game behind */
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.waiting-bar.active {
  opacity: 1;
  pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════ */
/* MOBILE RESPONSIVENESS - BULLETPROOF                           */
/* ═══════════════════════════════════════════════════════════ */

/* Base mobile viewport fix */
@media (max-width: 768px) {

  /* 1. ROOT CONTAINER - Fix for iOS Safari address bar */
  html {
    /* Use fixed pixel height, not vh which changes with address bar */
    height: 100%;
    overflow: hidden;
  }

  body {
    height: 100%;
    overflow: hidden;
    position: fixed;
    width: 100%;
    /* Prevent iOS bounce scroll on body */
    overscroll-behavior: none;
  }

  /* 2. APP BODY - Scrollable container */
  .app-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    /* Smooth scrolling */
    -webkit-overflow-scrolling: touch;
    /* Safe areas for iOS notch */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg-app);
  }

  /* 3. HIDE SIDEBAR ON MOBILE */
  .left-sidebar {
    display: none;
  }

  /* 4. GAME COLUMN - Main content wrapper */
  .game-column {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
    /* Allow natural scrolling within app-body */
    overflow: visible;
  }

  /* 5. CANVAS CONTAINER - Top section */
  .canvas-container {
    /* Fixed aspect ratio approach */
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;

    /* Flexible sizing with constraints */
    min-height: 280px;
    max-height: 45vh;

    /* Prevent shrinking */
    flex-shrink: 0;

    /* NOT sticky - let it scroll naturally */

    /* Ensure canvas fills container */
    display: flex;
    flex-direction: column;

    /* Visual separation */
    background: var(--bg-app);
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  /* 5a. Waiting Bar - Above canvas */
  .waiting-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    height: 100%;
    /* Cover entire canvas */
    width: 100%;
  }

  /* 5b. Actual Canvas Element */
  #gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    /* Prevent user interaction issues */
    touch-action: none;
  }

  /* 6. BETTING PANELS - Bottom section */
  .betting-panels {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 12px;
    /* Extra bottom padding for safe scrolling past last button */
    padding-bottom: calc(60px + env(safe-area-inset-bottom));

    /* Allow growth to push content */
    flex-grow: 1;
    flex-shrink: 0;

    background: var(--bg-app);
  }

  /* 7. INDIVIDUAL BET PANEL */
  .bet-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px 12px;
    max-width: 100%;

    /* Compact but not cramped */
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* 8. INPUT GROUPS - Stacked for safety and "Big Button" feel */
  .panel-body {
    display: flex;
    flex-direction: column;
    /* Stack vertically to prevent horizontal overflow */
    gap: 8px;
    width: 100%;
  }

  .input-block {
    width: 100%;
    display: flex;
    align-items: center;
    background: #0e1117;
    border-radius: 8px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 48px;
    /* Touch friendly */
  }

  .amount-input {
    flex: 1;
    height: 100%;
    font-size: 1.1rem;
    font-weight: 700;
    /* Readable */
    background: transparent;
    border: none;
    color: #fff;
    text-align: center;
  }

  .stepper-btn {
    width: 48px;
    /* Larger touch target */
    height: 100%;
    font-size: 1.2rem;
  }

  /* 9. BUTTONS - Full Width "Big Green Button" */
  .main-btn {
    width: 100%;
    /* Full width */
    min-height: 56px !important;
    /* Taller for easy tapping */
    height: 56px;
    font-size: 1rem;
    font-weight: 800;
    padding: 0 16px;
    border-radius: 10px;
    flex: none;
    /* Disable flex shrinking/growing */

    /* Layout content inside button */
    display: flex;
    flex-direction: row;
    /* Side by side text inside button */
    justify-content: space-between;
    align-items: center;

    /* Prevent accidental double-tap zoom */
    touch-action: manipulation;
  }

  .btn-status {
    font-size: 1rem;
  }

  .btn-val {
    font-size: 1rem;
  }

  /* 10. QUICK BET BUTTONS - Compact grid */
  .quick-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
    width: 100%;
  }

  .quick-btn {
    min-height: 40px;
    height: 40px;
    font-size: 0.8rem;
    padding: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
  }

  /* 11. AUTO TOGGLE */
  .auto-opts {
    justify-content: flex-start;
    gap: 15px;
    padding-top: 8px;
  }

  /* 12. HISTORY PILLS - Horizontal scroll */
  .history-bar {
    position: absolute;
    top: 0;
    height: 40px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 15;
  }

  .history-pill {
    flex-shrink: 0;
    padding: 4px 8px;
    font-size: 0.85rem;
  }

  /* 12.5 PARTNER BAR MOBILE */
  .partner-bar {
    height: 40px;
    padding: 0 8px;
    gap: 6px;
  }

  .partner-bar-left {
    gap: 6px;
  }

  .partner-bar-right {
    gap: 4px;
  }

  .partner-menu-label {
    display: none;
  }

  .partner-logo-wrap {
    height: 24px;
  }

  .partner-logo-wrap .partner-logo-img {
    max-height: 24px;
    max-width: 100px;
  }

  /* Hide Free Bet and Bonus pills on mobile — keep Cash only */
  .partner-info-pill:nth-child(2),
  .partner-info-pill:nth-child(3) {
    display: none;
  }

  .partner-info-pill {
    padding: 3px 6px;
    font-size: 0.65rem;
  }

  .partner-deposit-btn {
    padding: 4px 12px;
    font-size: 0.7rem;
  }

  .partner-profile-btn {
    width: 28px;
    height: 28px;
  }

  .partner-profile-btn svg {
    width: 16px;
    height: 16px;
  }

  /* 12.6 SECONDARY AND TERTIARY NAV MOBILE */
  .betway-nav-primary {
    height: 48px;
    padding: 0 8px;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .betway-nav-primary::-webkit-scrollbar {
    display: none;
  }

  .nav-items-center {
    gap: 12px;
  }

  .nav-item {
    font-size: 0.6rem;
    padding: 0 4px;
    flex-shrink: 0;
  }

  .nav-icons-right {
    position: static;
    margin-left: auto;
    padding-left: 12px;
    gap: 6px;
  }

  .betway-nav-secondary {
    height: 34px;
    padding: 0 8px;
  }

  .sec-item {
    font-size: 0.65rem;
    padding: 3px 6px;
  }

  /* 13. HEADER OPTIMIZATION */
  header.header-bar {
    height: 56px;
    min-height: 56px;
    padding: 8px 12px;
    flex-shrink: 0;
  }

  .header-logo-crop {
    height: 32px;
  }

  /* 14. TOUCH OPTIMIZATION */
  * {
    /* Prevent text selection */
    -webkit-user-select: none;
    user-select: none;
    /* Remove tap highlight */
    -webkit-tap-highlight-color: transparent;
  }

  /* Allow selection in inputs only */
  input,
  textarea,
  select {
    -webkit-user-select: text;
    user-select: text;
  }

  /* 15. PREVENT ZOOM ON INPUT FOCUS (iOS) */
  input[type="text"],
  input[type="number"] {
    font-size: 16px !important;
    /* iOS won't zoom if ≥16px */
  }
}

/* ========================================
   LANDSCAPE ORIENTATION ON MOBILE
   ======================================== */
@media (max-width: 768px) and (orientation: landscape) {

  /* Different layout for landscape */
  .game-column {
    flex-direction: row;
    height: 100vh;
    overflow: hidden;
  }

  .canvas-container {
    width: 60%;
    height: 100%;
    aspect-ratio: auto;
    max-height: none;
    border-radius: 0;
    flex: 1;
  }

  .betting-panels {
    width: 40%;
    height: 100%;
    overflow-y: auto;
    padding: 12px;
    gap: 12px;
    padding-bottom: 20px;
    border-left: 1px solid var(--border-glass);
  }

  .bet-panel {
    padding: 12px 10px;
    gap: 8px;
  }

  .panel-body {
    flex-direction: column;
    /* Revert to stacked in landscape */
    align-items: stretch;
  }

  .input-block {
    height: 40px;
  }

  .main-btn {
    height: 42px;
    font-size: 0.85rem;
    flex: auto;
    width: 100%;
  }
}

/* ========================================
   EXTRA SMALL DEVICES (iPhone SE, etc.)
   ======================================== */
@media (max-width: 375px) {
  .canvas-container {
    min-height: 240px;
    max-height: 35vh;
  }

  header.header-bar {
    height: 50px;
    padding: 6px 10px;
  }

  .betting-panels {
    padding: 12px 8px;
  }

  .main-btn {
    padding: 0 10px;
    font-size: 0.8rem;
  }
}

/* ── WAITING STATE OVERLAY (Spribe Style) ─────────────────── */

.waiting-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  background: rgba(11, 19, 26, 0.85);
  backdrop-filter: blur(4px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.waiting-bar.active {
  opacity: 1;
  pointer-events: auto;
}




.waiting-progress-bar .progress-fill {
  display: none;
}

.spribe-badge {
  margin-top: 8px;
  margin-bottom: 30px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #42c766;
  border-radius: 12px;
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.spribe-badge-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
}

.spribe-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: #cfdcdb;
  font-weight: 600;
}

.badge-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  background: #42c766;
  border-radius: 50%;
  color: #000;
}

.spribe-badge-year {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 2px;
  letter-spacing: 0.05em;
}

/* ── WAITING HEADER (UFC | Aviator) ───────────────────────── */

.waiting-header-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  margin-bottom: 0;
  position: relative;
  z-index: 60;
  max-width: 320px;
}

.partner-logo {
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.ufc-logo-img {
  width: 90px;
}

.aviator-logo-img {
  width: 110px;
}

.partner-divider {
  width: 2px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  transform: skew(-12deg);
}

.partner-text {
  width: 100%;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.22em;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: -4px;
  padding-bottom: 8px;
  position: relative;
  border-bottom: 3px solid rgba(255, 255, 255, 0.15);
}

.partner-text .progress-fill {
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--red-primary);
  box-shadow: 0 0 8px var(--red-primary);
  transition: width 0.1s linear;
  border-radius: 2px;
}

/* ── RED PLANE DECORATION (Bottom Left) ───────────────────── */

.red-plane-decoration {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 160px;
  height: auto;
  z-index: 10;
  opacity: 0.9;
  transform: rotate(-5deg);
  pointer-events: none;
}

.plane-body {
  width: 100%;
  height: auto;
  display: block;
  /* Ensures no weird spacing */
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.plane-propeller {
  position: absolute;
  width: 45px;
  /* Adjust size relative to body */
  height: auto;
  top: 0;
  /* Adjust based on SVG */
  right: -10px;
  /* Adjust based on SVG */
  animation: propSpin 0.08s linear infinite;
  opacity: 0.8;
}

@keyframes propSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* â”€â”€ Withdraw Button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.withdraw-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid var(--border-glass);
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.2s;
  margin-left: 8px;
}

.withdraw-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* â”€â”€ Withdraw Modal Styles â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.withdraw-card {
  max-width: 480px;
  /* Wider for grid */
}

/* Grid */
.withdraw-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.withdraw-site {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.withdraw-site:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.withdraw-site img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.withdraw-site span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Form */
.selected-site-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.withdraw-confirm-btn {
  width: 100%;
  padding: 14px;
  background: var(--green-gradient);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  margin-top: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(40, 169, 9, 0.3);
  text-transform: uppercase;
}

.withdraw-confirm-btn:disabled {
  background: #444;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
}

.withdraw-back-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 5px;
}

.withdraw-back-btn:hover {
  color: #fff;
}

/* Processing */
.processing-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--green-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.success-icon-lg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--green-primary);
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* ── HAMBURGER MENU ────────────────────────────────────────── */
.nav-burger-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 15px;
  height: 100%;
  z-index: 1001;
  cursor: pointer;
  pointer-events: auto;
}

.nav-burger-btn.active {
  background: #333333;
  color: #ffffff;
}

.burger-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 8px;
  min-width: 220px;
  z-index: 1000;
  box-shadow: var(--shadow-panel);
  display: none;
  /* Toggled by JS */
  animation: fadeIn 0.2s ease;
}

.burger-dropdown.active {
  display: block;
}

.burger-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: background 0.2s;
  text-decoration: none;
}

.burger-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.burger-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.burger-item .icon {
  font-size: 1.2rem;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── DEPOSIT BUTTON ──────────────────────────────────────────── */
.deposit-btn {
  background: linear-gradient(180deg, #4da3ff 0%, #0078ff 100%);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.2s;
  margin-left: 8px;
  box-shadow: 0 2px 8px rgba(0, 120, 255, 0.3);
}

.deposit-btn:hover {
  background: linear-gradient(180deg, #5ab0ff 0%, #1a85ff 100%);
  box-shadow: 0 4px 12px rgba(0, 120, 255, 0.5);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════ */
/* CASH-OUT CELEBRATION BARS (Original Aviator Style)          */
/* ═══════════════════════════════════════════════════════════ */
.cashout-stack {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.cashout-bar {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #2d3a1e 0%, #1e2a12 50%, #243016 100%);
  border: 1px solid rgba(80, 160, 30, 0.5);
  border-radius: 10px;
  padding: 6px 8px 6px 12px;
  gap: 10px;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  min-width: 260px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(40, 169, 9, 0.15);
}

.cashout-bar.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cashout-bar.fade-out {
  opacity: 0;
  transform: translateY(-5px) scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cashout-bar-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
}

.cashout-bar-label {
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: none;
  letter-spacing: 0;
}

.cashout-bar-multiplier {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.cashout-bar-right {
  background: linear-gradient(135deg, #3cb54a 0%, #28a909 100%);
  border-radius: 8px;
  padding: 8px 14px;
  flex-shrink: 0;
}

.cashout-bar-win {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.cashout-bar-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
  pointer-events: auto;
  flex-shrink: 0;
}

.cashout-bar-close:hover {
  color: #fff;
}