/* Fortune Aviator Stylesheet - Landscape Mode Replica */
:root {
  --bg-dark: #090a10;
  --panel-bg: #0B0E20;
  --panel-border: #261F3C;
  --card-bg: #151627;
  --input-bg: #1c1d30;
  --chip-bg: #23253b;

  --primary-green: #25c717;
  --primary-green-gradient: linear-gradient(180deg, #28d019 0%, #1ea710 100%);

  --primary-purple: #A959DF;

  --text-white: #ffffff;
  --text-gray: #a3a8c3;
  --text-muted: #6b7280;

  --mult-cyan: #30C7E8;
  --mult-purple: #A959DF;
  --mult-pink: #c026d3;

  --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body,
html {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #05060a url('./assets/bg.png') no-repeat center center / cover;
  font-family: var(--font-family);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-white);
}

/* Virtual Canvas Fixed Reference Container (960px x 540px Landscape) */
#game-container {
  width: 960px;
  height: 540px;
  position: relative;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 40px rgba(169, 89, 223, 0.3);
  border: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  transform-origin: center center;
  z-index: 10;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 2;
}

.screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}

/* ==========================================================================
   LOADER SCREEN (FULLSCREEN OVERLAY)
   ========================================================================== */
#loader-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: #05060a url('./assets/bg.png') no-repeat center center / cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 40px 20px 40px 20px;
  transition: opacity 0.5s ease;
}

#loader-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-branding {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.loader-logo {
  width: clamp(280px, 32vw, 450px);
  max-width: 85vw;
  max-height: 48vh;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 15px 35px rgba(169, 89, 223, 0.65));
  animation: logoPulse 3s ease-in-out infinite alternate;
}

@keyframes logoPulse {
  0% {
    transform: translateY(0) scale(1);
  }

  100% {
    transform: translateY(-8px) scale(1.03);
  }
}

.loader-content {
  width: 540px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-height: 600px) {
  #loader-screen {
    padding: 16px 20px 16px 20px;
  }

  .loader-logo {
    width: clamp(140px, 25vw, 200px);
    max-height: 32vh;
  }

  .loader-content {
    width: clamp(260px, 60vw, 360px);
    gap: 6px;
    margin-bottom: 4px;
  }

  .loader-status {
    font-size: 11px;
    height: 14px;
  }

  .progress-info {
    font-size: 10px;
  }
}

.progress-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #1c1d30;
  border-radius: 10px;
  overflow: hidden;
  padding: 2px;
  border: 1px solid var(--panel-border);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #A959DF 0%, #A959DF 50%, #25c717 100%);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(37, 199, 23, 0.8);
  transition: width 0.15s ease-out;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-gray);
  font-weight: 600;
}

.progress-percentage {
  color: var(--primary-green);
  font-weight: 500;
  font-family: monospace;
}

.loader-status {
  font-size: 12px;
  color: var(--text-gray);
  letter-spacing: 1px;
  height: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loader-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.start-btn {
  width: 220px;
  padding: 12px;
  background: var(--primary-green-gradient);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 199, 23, 0.4);
  display: none;
}

/* ==========================================================================
   GAME SCREEN (LANDSCAPE EXCLUSIVE LAYOUT)
   ========================================================================== */
#game-screen {
  background: var(--bg-dark);
}

/* Top Header Bar */
.game-header {
  height: 38px;
  background: url('./assets/topbar.png') no-repeat center center / 100% 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px;
  gap: 10px;
  position: relative;
  z-index: 500;
}

.header-balance {
  font-size: 15px;
  font-weight: 500;
  color: var(--primary-green);
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: 0.5px;
}

.header-currency {
  font-size: 13px;
  color: white;
  font-weight: 500;
  margin-left: 4px;
}

.menu-circle-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #1c1d30;
  border: 1px solid var(--panel-border);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

/* Menu Backdrop Blur Overlay */
.menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 450;
  transition: opacity 0.2s ease;
}

.menu-overlay.hidden {
  display: none !important;
}

/* Header Dropdown Menu Popup */
.menu-popup {
  position: absolute;
  top: 42px;
  right: 12px;
  width: clamp(260px, 80vw, 290px);
  max-height: calc(100vh - 50px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #A959DF transparent;
  background: #0B0E20;
  border: 1.5px solid #261F3C;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(169, 89, 223, 0.3);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
}

.menu-popup::-webkit-scrollbar {
  width: 4px;
}

.menu-popup::-webkit-scrollbar-thumb {
  background: #A959DF;
  border-radius: 4px;
}

.menu-popup.hidden {
  display: none !important;
}

.menu-profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  min-height: 42px;
  box-sizing: border-box;
  background: url('./assets/profilebg.png') no-repeat center center / 100% 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.menu-profile-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-profile-user .player-icon,
#user-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.menu-username {
  font-size: 13px;
  font-weight: 700;
  color: white;
}

.change-avatar-img-btn {
  height: 24px;
  width: auto;
  cursor: pointer;
  object-fit: contain;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.change-avatar-img-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
}

.menu-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: url('./assets/optionbg.png') no-repeat center center / 100% 100%;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  transition: all 0.15s ease;
}

.menu-divider-spacer {
  height: 14px;
  width: 100%;
}

.menu-item-row.nav-row {
  justify-content: flex-start;
  gap: 10px;
  cursor: pointer;
}

.menu-item-row.nav-row:hover {
  filter: brightness(1.25);
  transform: translateX(2px);
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-icon {
  font-size: 13px;
  width: 16px;
  text-align: center;
}

.menu-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
}

.avatar-btn-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* Custom Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .2s;
  border-radius: 18px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked+.toggle-slider {
  background-color: #25c717;
}

input:checked+.toggle-slider:before {
  transform: translateX(16px);
}

/* Landscape Split Body */
.game-body-landscape {
  display: flex;
  height: calc(100% - 38px);
  padding: 0 8px 8px 8px;
  gap: 8px;
}

/* LEFT SIDEBAR: Live Bets Panel */
.live-bets-panel {
  width: 270px;
  height: 100%;
  background: #0B0E20;
  border-radius: 10px;
  border: 1px solid #261F3C;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.bets-tab-header {
  display: flex;
  background: #0B0E20 url('./assets/livepaneltopbar.png') no-repeat center center / 100% 100%;
  padding: 3px;
  gap: 3px;
  height: 32px;
  margin: 2px 2px 0 2px;
  border-radius: 7px 7px 0 0;
  overflow: hidden;
}

.bets-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-gray);
  border-radius: 14px;
  cursor: pointer;
}

.bets-tab.active {
  background: #A959DF;
  color: white;
}

.bets-sub-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 12px;
  background: #0B0E20 url('./assets/totalwincontainer.png') no-repeat center center / 100% 100%;
  margin: 6px 4px 4px 4px;
  border-radius: 6px;
  min-height: 54px;
  position: relative;
}

.sub-info-view {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.sub-info-view.hidden {
  display: none !important;
}

.previous-round-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2px 0;
}

.previous-round-label {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

.previous-round-mult {
  font-size: 22px;
  font-weight: 500;
  color: #A959DF;
  font-family: 'Outfit', 'Inter', sans-serif;
  line-height: 1.1;
  margin-top: 1px;
}

/* Top Tab Filters */
.top-filter-group {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-bottom: 3px;
}

.top-filter-group:last-child {
  margin-bottom: 0;
}

.top-filter-btn {
  flex: 1;
  text-align: center;
  padding: 3px 0;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.top-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.top-filter-btn.active {
  background: #A959DF;
  color: white;
}

/* Top Bet Card Items */
.top-bet-card {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.top-bet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.top-bet-user {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-user-meta {
  display: flex;
  flex-direction: column;
}

.top-username {
  font-size: 11px;
  font-weight: 700;
  color: white;
  line-height: 1.1;
}

.top-date {
  font-size: 9px;
  color: #64748b;
}

.top-bet-icons {
  display: flex;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
}

.top-bet-body {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
}

.top-bet-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.top-bet-col.align-right {
  text-align: right;
  align-items: flex-end;
}

.top-bet-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.align-right .top-bet-field {
  justify-content: flex-end;
}

.field-label {
  color: #64748b;
  font-weight: 400;
}

.field-val-white {
  color: white;
  font-weight: 500;
}

.field-val-pink {
  color: #ec4899;
  font-weight: 500;
}

.field-val-purple {
  color: #A959DF;
  font-weight: 500;
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: 0.2px;
}

.field-val-cyan {
  color: #30C7E8;
  font-weight: 500;
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: 0.2px;
}

/* Top Rounds View Styles (Exact Spribe UI Replica) */
.top-rounds-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0b0e20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

.top-round-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 4px 10px;
  margin-bottom: 4px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease;
}

.top-round-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.round-datetime {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
}

.round-right-col {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.round-mult {
  font-size: 11px;
  font-weight: 800;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.round-pf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: opacity 0.15s ease;
}

.round-pf-icon:hover {
  opacity: 0.75;
  background: transparent !important;
}

.top-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: opacity 0.15s ease;
}

.top-icon-btn:hover {
  opacity: 0.75;
  background: transparent !important;
}

.top-icon-btn img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

.round-pf-icon img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

.sub-info-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack .mini-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-left: -5px;
  border: 1.5px solid #25c717;
  background-size: cover;
  background-position: center;
}

.avatar-stack .mini-avatar.av1 {
  background-image: url('./assets/avatars/1.png');
  background-size: cover;
  background-position: center;
}

.avatar-stack .mini-avatar.av2 {
  background-image: url('./assets/avatars/2.png');
  background-size: cover;
  background-position: center;
}

.avatar-stack .mini-avatar.av3 {
  background-image: url('./assets/avatars/3.png');
  background-size: cover;
  background-position: center;
}

.avatar-stack .mini-avatar:first-child {
  margin-left: 0;
}

.total-win-val {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.5px;
  line-height: 1;
}

.sub-info-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 2px;
}

.bets-count-text {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.bets-count-num {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
}

.bets-count-label {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

.total-win-text {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

.sub-info-loader-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
}

.sub-info-loader-fill {
  width: 100%;
  height: 100%;
  background: #A959DF;
  border-radius: 2px;
  box-shadow: 0 0 6px #A959DF;
  transition: width 0.03s linear;
}

.table-head-row {
  display: grid;
  grid-template-columns: 2.2fr 1.6fr 1.3fr 1.9fr;
  padding: 5px 6px;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
  gap: 3px;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.table-head-row>span,
.table-head-row>div {
  white-space: nowrap;
  min-width: 0;
}

.table-body-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}

.table-body-list::-webkit-scrollbar {
  display: none;
}

.table-row-item {
  display: grid;
  grid-template-columns: 2.2fr 1.6fr 1.3fr 1.9fr;
  padding: 4px 6px;
  font-size: 10.5px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  gap: 3px;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.table-row-item>div,
.table-row-item>span {
  white-space: nowrap;
  min-width: 0;
}

.table-row-item.win-row {
  background: rgba(37, 199, 23, 0.08);
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-gray);
  min-width: 0;
  overflow: hidden;
}

.player-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.player-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: white;
  flex-shrink: 0;
}

.val-mult-cyan {
  color: var(--mult-cyan);
  font-weight: 400;
}

.val-mult-purple {
  color: var(--mult-purple);
  font-weight: 400;
}

.val-mult-pink {
  color: var(--mult-pink);
  font-weight: 400;
}

.val-mult-muted {
  color: #64748b;
  font-weight: 400;
}

.val-win-green {
  color: var(--primary-green);
  font-weight: 400;
  text-align: right;
}

.win-cell {
  text-align: right;
  padding-right: 12px;
  width: 100%;
  box-sizing: border-box;
}

.panel-footer-spribe {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  font-size: 10px;
  color: #ffffff;
  font-weight: 400;
  border-top: 1px solid #261F3C;
  background: #0B0E20;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.panel-footer-spribe span,
.panel-footer-spribe strong {
  color: #ffffff;
}

.provably-fair-text {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.provably-fair-text:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.fair-icon {
  width: 12px;
  height: 12px;
  object-fit: contain;
  display: inline-block;
}

/* RIGHT COLUMN: History + Canvas + Dual Bets */
.game-main-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}

/* Multiplier History Bar Container */
.history-bar-container {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  height: 28px;
  background: var(--bg-dark) url('./assets/historybar.png') no-repeat center center / 100% 100%;
  border-radius: 8px;
  padding: 0 4px;
}

.history-bar {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 4px;
}

.history-bar::-webkit-scrollbar {
  display: none;
}

.history-item {
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  padding: 1px 6px;
  border-radius: 8px;
  background: transparent;
}

.history-item.cyan {
  color: var(--mult-cyan);
  font-weight: 400;
  font-family: 'Outfit', 'Inter', sans-serif;
  text-shadow: 0 0 8px rgba(48, 199, 232, 0.45);
}

.history-item.purple {
  color: var(--mult-purple);
  font-weight: 400;
  font-family: 'Outfit', 'Inter', sans-serif;
  text-shadow: 0 0 8px rgba(169, 89, 223, 0.45);
}

.history-item.pink {
  color: var(--mult-pink);
}

.history-more-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.history-more-btn:hover {
  transform: scale(1.1);
}

.history-more-btn img {
  height: 18px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Round History Popup Overlay */
.round-history-popup {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #0B0E20;
  border: 1px solid #261F3C;
  border-radius: 10px;
  padding: 8px 12px;
  z-index: 100;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.95), 0 0 20px rgba(109, 40, 217, 0.25);
  backdrop-filter: blur(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.round-history-popup.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

.round-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  padding-bottom: 4px;
  border-bottom: none;
  margin-bottom: 6px;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.round-history-close {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 18px;
  height: 18px;
  transition: transform 0.15s ease;
}

.round-history-close:hover {
  transform: scale(1.1);
}

.round-history-close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.round-history-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  max-height: 125px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.round-history-grid::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.popup-history-item {
  font-size: 12px;
  font-weight: 400;
  font-family: 'Outfit', 'Inter', sans-serif;
  white-space: nowrap;
}

.popup-history-item.cyan {
  color: var(--mult-cyan);
  font-weight: 400;
  font-family: 'Outfit', 'Inter', sans-serif;
  text-shadow: 0 0 8px rgba(48, 199, 232, 0.45);
}

.popup-history-item.purple {
  color: var(--mult-purple);
  font-weight: 400;
  font-family: 'Outfit', 'Inter', sans-serif;
  text-shadow: 0 0 8px rgba(169, 89, 223, 0.45);
}

.popup-history-item.pink {
  color: var(--mult-pink);
}

/* Canvas Wrapper */
.canvas-wrapper {
  flex: 1;
  min-height: 0;
  position: relative;
  background: url('./assets/middle_bg.png') no-repeat center center / 100% 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
}

.fun-mode-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: var(--primary-purple);
  color: white;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
  z-index: 5;
  pointer-events: none;
}

#flight-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.partners-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 4;
}

.partners-title {
  font-size: 18px;
  font-weight: 900;
  color: white;
  letter-spacing: 1.5px;
}

.partners-underline-track {
  width: 160px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
  position: relative;
}

.partners-underline-fill {
  width: 100%;
  height: 100%;
  background: var(--primary-purple);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--primary-purple), 0 0 5px #A959DF;
  transition: width 0.03s linear;
}

.multiplier-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 6;
}

.multiplier-display::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 180px;
  background: url('./assets/textshadow.png') no-repeat center center / contain;
  pointer-events: none;
  z-index: -1;
  display: none;
}

.multiplier-display.active::before {
  display: block;
}

.multiplier-val {
  font-size: 56px;
  font-weight: 500;
  color: #ffffff;
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: -1px;
  text-shadow: 0 0 20px rgba(48, 199, 232, 0.7), 0 0 40px rgba(48, 199, 232, 0.3), 0 4px 12px rgba(0, 0, 0, 0.8);
}

.multiplier-val.crashed {
  color: #ff2a55;
  text-shadow: 0 0 20px rgba(255, 42, 85, 0.7);
}

.flew-away-text {
  font-size: 16px;
  font-weight: 800;
  color: #ff2a55;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: -6px;
}

.online-users-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(18, 19, 33, 0.85);
  border: 1px solid var(--panel-border);
  padding: 2px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  z-index: 5;
}

.user-avatar-group {
  display: flex;
  align-items: center;
}

.mini-avatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #121321;
  margin-left: -4px;
}

.mini-avatar:first-child {
  margin-left: 0;
}

/* Dual Betting Section (Side by side in landscape) */
.bet-controls-container {
  height: auto;
  min-height: 110px;
  display: flex;
  gap: 8px;
  background: transparent;
  border: none;
}

.bet-card {
  flex: 1;
  min-width: 0;
  background: #131728;
  border-radius: 10px;
  padding: 8px;
  border: 1px solid #232a45;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.toggle-panel-btn {
  position: absolute;
  top: 4px;
  right: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  z-index: 15;
  transition: transform 0.15s ease;
}

.toggle-panel-btn:hover {
  transform: scale(1.1);
}

.toggle-panel-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.bet-controls-container.single-panel {
  justify-content: center;
}

.bet-controls-container.single-panel #bet-panel-1 {
  max-width: 100%;
  width: 100%;
  flex: 1;
}

.bet-controls-container.single-panel #bet-panel-1 .bet-body-flex {
  justify-content: center;
  gap: 24px;
}

.bet-controls-container.single-panel #toggle-panel-1-btn {
  right: 8px;
  top: 4px;
}

.bet-controls-container.single-panel #bet-panel-2 {
  display: none !important;
}

.bet-body-flex {
  display: flex;
  gap: 8px;
  align-items: center;
  height: 100%;
}

.bet-left-column {
  flex: 0.8;
  max-width: 140px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: center;
}

.stepper-box {
  display: flex;
  background: url('./assets/betvaluebg.png') no-repeat center center / 100% 100%;
  border-radius: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  height: 32px;
  width: 100%;
  max-width: 140px;
  margin: 0 auto;
  box-sizing: border-box;
}

.step-btn-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.step-btn-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bet-amount-input {
  flex: 1;
  min-width: 0;
  padding: 0 2px;
  box-sizing: border-box;
  background: transparent;
  border: none;
  color: white;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  outline: none;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.quick-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
  max-width: 115px;
  margin: 0 auto;
}

.chip-btn-pill {
  width: 100%;
  max-width: 55px;
  margin: 0 auto;
  background: url('./assets/betbuttonbg.png') no-repeat center center / 100% 100%;
  border: none;
  color: white;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 0;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s ease;
}

.chip-btn-pill:hover {
  opacity: 0.9;
}

/* Disabled states for Bet Stepper, Input, and Quick Chips (100, 200, 500, 1000) */
.step-btn-circle:disabled,
.step-btn-circle.disabled,
.chip-btn-pill:disabled,
.chip-btn-pill.disabled,
.bet-amount-input:disabled,
.bet-amount-input.disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: brightness(0.85);
}

.step-btn-circle:disabled img,
.step-btn-circle.disabled img {
  opacity: 0.6 !important;
}

.bet-amount-input:disabled,
.bet-amount-input.disabled {
  color: rgba(255, 255, 255, 0.75) !important;
  text-shadow: none !important;
}

.stepper-box.disabled {
  opacity: 0.65 !important;
  pointer-events: none !important;
  filter: brightness(0.85);
}

.quick-chips-grid.disabled {
  opacity: 0.65 !important;
  pointer-events: none !important;
  filter: brightness(0.85);
}



/* Big Action Button (Bet, Cancel, Cashout) */
.action-btn-green {
  flex: 0.85;
  max-width: 140px;
  width: 100%;
  height: 70px;
  align-self: center;
  background: url('./assets/bet.png') no-repeat center center / 100% 100%;
  border: none;
  border-radius: 0;
  color: white;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: none;
  transition: transform 0.1s;
}

.action-btn-green:active {
  transform: scale(0.97);
}

.btn-title-main {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.btn-sub-currency {
  font-size: 10px;
  font-weight: 500;
  margin-top: 2px;
  opacity: 0.95;
  text-align: center;
  white-space: nowrap;
}

.action-btn-green.waiting {
  background: url('./assets/cancel.png') no-repeat center center / 100% 100%;
  box-shadow: none;
  animation: none;
}

.action-btn-green.cashout {
  background: url('./assets/cashout.png') no-repeat center center / 100% 100%;
  box-shadow: none;
  animation: none;
}

@keyframes pulseCash {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.02);
  }
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   CHANGE AVATAR MODAL (7 COLS x 9 ROWS = 63 AVATARS - CENTERED)
   ========================================================================== */
.avatar-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-modal-overlay.hidden {
  display: none !important;
}

.avatar-modal-container {
  width: 350px;
  max-width: 88%;
  max-height: 86vh;
  background: #0B0E20;
  border: 1.5px solid #261F3C;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin: auto;
}

.avatar-modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050711;
  border-bottom: 1.5px solid #261F3C;
  padding: 10px 12px;
  margin: -12px -14px 10px -14px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.avatar-modal-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: white;
  margin: 0;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.avatar-modal-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: white;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.avatar-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.08);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px 8px;
  overflow-y: auto;
  max-height: 68vh;
  padding: 2px 4px;
  justify-items: center;
  align-items: center;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.avatar-grid::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.avatar-item {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #14182e;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
}

.avatar-item:hover {
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
  z-index: 2;
}

.avatar-item.active {
  border-color: #ffffff;
  box-shadow: none;
}

.avatar-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ==========================================================================
   FREE BETS MANAGEMENT MODAL (CENTERED)
   ========================================================================== */
.free-bets-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.free-bets-modal-overlay.hidden {
  display: none !important;
}

.free-bets-modal-container {
  width: 380px;
  max-width: 90%;
  background: #0B0E20;
  border: 1.5px solid #261F3C;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin: auto;
  overflow: hidden;
}

.free-bets-modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050711;
  border-bottom: 1.5px solid #261F3C;
  padding: 10px 12px;
}

.free-bets-modal-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: white;
  margin: 0;
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.free-bets-modal-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s ease;
}

.free-bets-modal-close:hover {
  background: transparent;
  transform: translateY(-50%) scale(1.1);
}

.free-bets-modal-close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.free-bets-modal-body {
  padding: 14px 16px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.play-with-cash-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(35, 159, 2, 0.08);
  border: 1px solid #239F02;
  border-radius: 8px;
  padding: 9px 12px;
}

.green-radio-dot {
  color: #239F02;
  font-size: 14px;
  line-height: 1;
}

.play-with-cash-option .option-label {
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.active-free-bets-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.active-bets-title {
  font-size: 13px;
  font-weight: 700;
  color: white;
}

.archive-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.archive-btn:hover {
  background: transparent;
  opacity: 0.9;
  transform: scale(1.04);
}

.archive-btn img {
  height: 26px;
  width: auto;
  display: block;
  object-fit: contain;
}

.archive-btn.back-btn {
  background: transparent;
  border: none;
  padding: 0;
}

.archive-btn.back-btn:hover {
  background: transparent;
  opacity: 0.9;
  transform: scale(1.04);
}

.archive-btn.back-btn img {
  height: 26px;
  width: auto;
  display: block;
  object-fit: contain;
}

.close-icon-sm {
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
}

.free-bets-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 0 6px 0;
  gap: 10px;
}

.free-bets-empty-state .ticket-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.empty-ticket-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
}

.empty-state-text {
  font-size: 14px;
  font-weight: 700;
  color: white;
  margin: 0;
  font-family: 'Outfit', 'Inter', sans-serif;
}

/* ==========================================================================
   MY BET HISTORY MODAL (CENTERED)
   ========================================================================== */
.bet-history-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bet-history-modal-overlay.hidden {
  display: none !important;
}

.bet-history-modal-container {
  width: 355px;
  max-width: 86%;
  max-height: 76vh;
  background: #0B0E20;
  border: 1.5px solid #261F3C;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin: auto;
  overflow: hidden;
}

.bet-history-modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050711;
  border-bottom: 1.5px solid #261F3C;
  padding: 8px 10px;
}

.bet-history-modal-header h2 {
  font-size: 14px;
  font-weight: 800;
  color: white;
  margin: 0;
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.bet-history-modal-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s ease;
}

.bet-history-modal-close:hover {
  background: transparent;
  transform: translateY(-50%) scale(1.1);
}

.bet-history-modal-close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bet-history-modal-body {
  padding: 10px 12px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.bet-history-table-header {
  display: grid;
  grid-template-columns: 0.8fr 1.3fr 1.9fr;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.bet-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bet-history-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.bet-history-row {
  display: grid;
  grid-template-columns: 0.8fr 1.3fr 1.9fr;
  align-items: center;
  background: #050814;
  border: 1px solid #1a2035;
  border-radius: 7px;
  padding: 6px 8px;
  box-sizing: border-box;
}

.bet-history-row.win-row {
  border: 1px solid #239F02;
  background: rgba(35, 159, 2, 0.08);
}

.bet-history-date-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bet-history-time {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.bet-history-date {
  font-size: 10px;
  font-weight: 500;
  color: #64748b;
}

.bet-history-center-col {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bet-history-amount {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
}

.bet-history-mult-tag {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.5px 6px;
  font-size: 11px;
  font-weight: 400;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.bet-history-mult-tag.purple {
  color: #A959DF;
  font-weight: 400;
}

.bet-history-mult-tag.cyan {
  color: #30C7E8;
  font-weight: 400;
}

.bet-history-mult-tag.pink {
  color: #f472b6;
}

.bet-history-actions-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.bet-history-win-amount {
  font-size: 11px;
  font-weight: 700;
  font-family: 'Outfit', 'Inter', sans-serif;
  margin-right: 2px;
}

.bet-history-win-amount.win-text {
  color: #ffffff;
}

.bet-history-win-amount.muted-text {
  color: #64748b;
}

.bet-history-action-img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  display: block;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.bet-history-action-img:hover {
  transform: scale(1.2);
}

/* How To Play Modal Styles */
.how-to-play-modal-container {
  width: 500px;
  max-width: 90vw;
  background: #0d0f1b;
  border-radius: 12px;
  border: 1px solid #1a2136;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.how-to-play-modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: #060710;
  border-bottom: 1px solid #161c2e;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.how-to-play-modal-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
}

.how-to-play-modal-close:hover {
  opacity: 0.8;
}

.how-to-play-modal-close img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.how-to-play-modal-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.how-to-play-video-box,
.game-rules-video-box {
  width: 100%;
  height: 195px;
  background: #373948;
  border-radius: 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 10px 0;
}

.how-to-play-video-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  max-width: 82%;
  padding: 0 10px;
}

.restrict-icon-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.video-notice-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #f1f5f9;
}

.yt-link {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 700;
  margin-top: 2px;
  display: inline-block;
}

.yt-badge {
  position: absolute;
  bottom: 10px;
  right: 12px;
  display: flex;
  align-items: center;
}

.how-to-play-steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.how-to-play-step-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1c1511;
  border: 1px solid #583c1f;
  border-radius: 7px;
  padding: 7px 12px;
}

.step-icon-circle {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
}

.step-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.step-text {
  font-size: 11px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.35;
}

.detailed-rules-btn {
  width: 80%;
  margin: 4px auto 0;
  display: block;
  padding: 9px;
  background: #251a13;
  border: 1px solid #593d20;
  border-radius: 7px;
  color: #e5a744;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: lowercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.detailed-rules-btn:hover {
  background: #352419;
  border-color: #7b552b;
}

/* ==========================================================================
   GAME RULES MODAL (EXACT SPEC REPLICA)
   ========================================================================== */
/* ==========================================================================
   GAME RULES MODAL (EXACT SPEC REPLICA - COMPACT FIT)
   ========================================================================== */
.game-rules-modal-container {
  width: 500px;
  max-width: 88%;
  max-height: 480px;
  background: #0b0d18;
  border: 1.5px solid #1a1f33;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.game-rules-modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #050610;
  border-bottom: 1px solid #161c2e;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.game-rules-modal-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
}

.game-rules-modal-close:hover {
  opacity: 0.8;
}

.game-rules-modal-close img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  display: block;
}

.game-rules-modal-body {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  font-family: 'Outfit', 'Inter', sans-serif;
  scrollbar-width: thin;
  scrollbar-color: #262c44 transparent;
}

.game-rules-modal-body::-webkit-scrollbar {
  width: 4px;
}

.game-rules-modal-body::-webkit-scrollbar-thumb {
  background: #262c44;
  border-radius: 3px;
}

.game-rules-desc {
  font-size: 10px;
  color: #a3a8c3;
  line-height: 1.35;
  margin: 0;
  font-weight: 500;
}

.provably-fair-link {
  font-size: 10px;
  color: #e53935;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: -2px;
  transition: color 0.15s ease;
}

.provably-fair-link:hover {
  text-decoration: underline;
  color: #ff4d4d;
}

.game-rules-section-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: 0.5px;
  margin-top: 8px;
  margin-bottom: 2px;
}

.game-rules-easy-title {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 4px;
  margin-bottom: 6px;
}

.game-rules-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.game-rules-step-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-card-num {
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  font-family: 'Outfit', 'Inter', sans-serif;
  line-height: 1;
}

.step-card-img-wrapper {
  width: 100%;
  height: 72px;
  background: #121524;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid #1d2338;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.step-card-footer {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-top: 1px;
}

.step-card-cash-icon {
  width: 13px;
  height: 10px;
  flex-shrink: 0;
  margin-top: 1.5px;
}

.step-card-text {
  font-size: 9px;
  color: #cbd5e1;
  line-height: 1.25;
  font-weight: 500;
}

.highlight-red {
  color: #e53935;
  font-weight: 800;
}

.game-rules-remember-text {
  font-size: 10px;
  color: #cbd5e1;
  line-height: 1.4;
  margin-top: 10px;
  margin-bottom: 6px;
  font-weight: 400;
}

.game-rules-details-section,
.game-rules-functions-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game-rules-main-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: 0.5px;
  margin-top: 8px;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.game-rules-sub-heading {
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 4px;
  margin-bottom: 2px;
}

.game-rules-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game-rules-bullet-list li {
  font-size: 9.5px;
  color: #94a3b8;
  line-height: 1.35;
  position: relative;
  padding-left: 14px;
}

.red-arrow {
  position: absolute;
  left: 0;
  top: 0;
  color: #e53935;
  font-weight: 800;
  font-size: 10px;
}

.shield-check-icon {
  display: inline-block;
  font-size: 10px;
}

/* ==========================================================================
   PLAY MODE SELECTOR BADGE & MODAL
   ========================================================================== */
.topbar-mode-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 6px;
  user-select: none;
  transition: all 0.2s ease;
}

.topbar-mode-badge.demo {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.topbar-mode-badge.real {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
}

.topbar-mode-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mode-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.mode-menu-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mode-menu-pill.demo {
  background: #281e0f;
  color: #f59e0b;
  border: 1px solid #78470a;
}

.mode-menu-pill.real {
  background: #09261a;
  color: #10b981;
  border: 1px solid #046c46;
}

/* Mode Selector Modal Container */
.mode-selector-container {
  width: 480px;
  max-width: 90%;
  background: #0b0d18;
  border: 1.5px solid #1a1f33;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.mode-selector-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mode-selector-intro {
  font-size: 11px;
  color: #94a3b8;
  margin: 0;
  font-weight: 600;
}

.mode-cards-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mode-select-card {
  background: #111526;
  border: 1.5px solid #1d243a;
  border-radius: 10px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: relative;
  transition: all 0.2s ease;
}

.mode-select-card:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.mode-select-card.active {
  border-color: #e53935;
  background: #17101a;
}

.mode-badge-top {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
}

.demo-tag {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.real-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.mode-card-icon {
  font-size: 26px;
  margin-top: 4px;
}

.mode-card-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

.mode-card-desc {
  font-size: 9.5px;
  color: #8fa0b5;
  line-height: 1.35;
  flex-grow: 1;
}

.mode-action-btn {
  width: 100%;
  padding: 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  margin-top: 4px;
  transition: filter 0.15s ease;
}

.mode-action-btn.demo-btn {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
}

.mode-action-btn.real-btn {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
}

.mode-action-btn:hover {
  filter: brightness(1.15);
}

/* Canvas Online Users Badge & Dynamic Avatars */
.user-avatar-group {
  display: flex;
  align-items: center;
}

.user-avatar-group .mini-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-left: -5px;
  border: 1.5px solid #22c55e;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
}

.user-avatar-group .mini-avatar:first-child {
  margin-left: 0;
}

.user-avatar-group .mini-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ==========================================================================
   PROVABLY FAIR SETTINGS MODAL (EXACT SPEC REPLICA)
   ========================================================================== */
.pf-settings-modal-container {
  width: 480px;
  max-width: 92%;
  max-height: 460px;
  background: #090b16;
  border: 1.5px solid #1a1e32;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  color: #ffffff;
}

.pf-settings-modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: #050610;
  border-bottom: 1px solid #161a2b;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.pf-settings-modal-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
}

.pf-settings-modal-close:hover {
  opacity: 0.8;
}

.pf-settings-modal-close img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.pf-settings-modal-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #262c44 transparent;
}

.pf-notice-banner {
  background: #04050d;
  border: 1px solid #141728;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pf-notice-text {
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.35;
  font-weight: 500;
  max-width: 68%;
}

.pf-what-is-btn {
  background: #111322;
  border: 1px solid #1e2238;
  border-radius: 16px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #e53935;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.pf-what-is-btn:hover {
  background: #171b30;
  border-color: #e53935;
}

.pf-q-icon {
  background: #e53935;
  color: #ffffff;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

.pf-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pf-section-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pf-section-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #161a2b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.pf-section-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pf-section-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
}

.pf-section-sub {
  font-size: 9.5px;
  color: #64748b;
  line-height: 1.3;
}

.pf-radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.pf-radio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #04050d;
  border: 1px solid #141728;
  transition: border-color 0.15s ease;
}

.pf-radio-row.active {
  border-color: #1e253e;
}

.pf-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  user-select: none;
  white-space: nowrap;
}

.pf-radio-input {
  display: none;
}

.pf-radio-custom {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.pf-radio-input:checked+.pf-radio-custom {
  border-color: #22c55e;
}

.pf-radio-input:checked+.pf-radio-custom::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  display: block;
}

.pf-seed-box {
  background: #111424;
  border: 1px solid #1e243a;
  border-radius: 5px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 180px;
  box-sizing: border-box;
}

.pf-seed-box.manual-box {
  min-width: 220px;
}

.pf-seed-prefix {
  font-size: 10px;
  color: #475569;
  font-weight: 500;
}

.pf-seed-val {
  font-size: 10.5px;
  font-weight: 600;
  color: #ffffff;
  font-family: monospace;
  letter-spacing: 0.3px;
  flex: 1;
}

.pf-manual-input {
  background: none;
  border: none;
  color: #ffffff;
  font-family: monospace;
  font-size: 10.5px;
  font-weight: 600;
  outline: none;
  flex: 1;
  width: 100%;
}

.pf-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.pf-copy-btn:hover {
  color: #ffffff;
}

.pf-change-btn {
  background: #168038;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 2px;
  transition: background 0.15s ease;
}

.pf-change-btn:hover {
  background: #1cb04d;
}

.pf-divider {
  height: 1px;
  background: #161a2b;
  margin: 2px 0;
}

.pf-server-seed-container {
  background: #04050d;
  border: 1px solid #141728;
  border-radius: 6px;
  padding: 8px 12px;
}

.pf-server-hash-input {
  width: 100%;
  background: none;
  border: none;
  color: #ffffff;
  font-family: monospace;
  font-size: 10.5px;
  letter-spacing: 0.3px;
  outline: none;
  word-break: break-all;
}

.pf-settings-modal-footer {
  background: #131728;
  padding: 8px 12px;
  border-top: 1px solid #1d2238;
  font-size: 10px;
  color: #94a3b8;
  text-align: center;
  font-weight: 500;
}

@media (max-width: 580px) {
  .pf-settings-modal-container {
    width: 94vw !important;
    max-width: 94vw !important;
    max-height: 88vh !important;
  }

  .pf-notice-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .pf-notice-text {
    max-width: 100% !important;
  }

  .pf-radio-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .pf-seed-box,
  .pf-seed-box.manual-box {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .pf-seed-val,
  .pf-manual-input {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .pf-server-hash-input {
    word-break: break-all !important;
    white-space: normal !important;
    width: 100% !important;
  }
}


/* ==========================================================================
   MOBILE & TABLET LANDSCAPE FULL-VIEWPORT RESPONSIVE SYSTEM
   (Galaxy Note 2/3, Galaxy S9+, BlackBerry Z30, iPhone Landscape, etc.)
   ========================================================================== */

#game-container.mobile-landscape-mode {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Fluid Landscape Header */
.mobile-landscape-mode .game-header {
  height: clamp(30px, 6vh, 38px);
  padding: 0 clamp(6px, 1.5vw, 12px);
}

.mobile-landscape-mode .header-balance {
  font-size: clamp(12px, 2.5vw, 15px);
}

.mobile-landscape-mode .header-currency {
  font-size: clamp(10px, 2vw, 13px);
}

/* Fluid Landscape Layout */
.mobile-landscape-mode .game-body-landscape {
  height: calc(100% - clamp(30px, 6vh, 38px));
  padding: 0 clamp(4px, 1vw, 8px) clamp(4px, 1vw, 8px) clamp(4px, 1vw, 8px);
  gap: clamp(4px, 1vw, 8px);
}

/* Left Live Bets Panel in Fluid Landscape */
.mobile-landscape-mode .live-bets-panel {
  width: clamp(230px, 32vw, 290px);
  flex-shrink: 0;
}

.mobile-landscape-mode .bets-tab-header {
  height: clamp(24px, 4.5vh, 32px);
}

.mobile-landscape-mode .bets-tab {
  font-size: clamp(9.5px, 1.8vh, 11px);
}

.mobile-landscape-mode .bets-sub-info {
  min-height: clamp(38px, 8vh, 54px);
  padding: clamp(3px, 1vh, 6px) clamp(6px, 1vw, 12px);
}

.mobile-landscape-mode .total-win-val {
  font-size: clamp(14px, 3vh, 20px);
}

.mobile-landscape-mode .bets-count-num {
  font-size: clamp(11px, 2vh, 15px);
}

.mobile-landscape-mode .bets-count-label,
.mobile-landscape-mode .total-win-text {
  font-size: clamp(9.5px, 1.8vh, 13px);
}

.mobile-landscape-mode .table-head-row,
.mobile-landscape-mode .table-row-item {
  padding: 3px 5px;
  font-size: clamp(9px, 1.8vh, 10.5px);
  grid-template-columns: 2.2fr 1.6fr 1.3fr 1.9fr;
  gap: 3px;
}

.mobile-landscape-mode .table-row-item>div,
.mobile-landscape-mode .table-row-item>span,
.mobile-landscape-mode .table-head-row>div,
.mobile-landscape-mode .table-head-row>span {
  white-space: nowrap;
  min-width: 0;
}

.mobile-landscape-mode .player-cell {
  gap: 3px;
  min-width: 0;
}

.mobile-landscape-mode .player-icon {
  width: 12px;
  height: 12px;
  font-size: 7.5px;
  flex-shrink: 0;
}

/* Right Main Column in Fluid Landscape */
.mobile-landscape-mode .game-main-column {
  flex: 1;
  min-width: 0;
  gap: clamp(3px, 0.8vh, 6px);
}

.mobile-landscape-mode .history-bar-container {
  height: clamp(22px, 4vh, 28px);
}

.mobile-landscape-mode .history-item {
  font-size: clamp(9.5px, 1.8vh, 11px);
  padding: 1px clamp(3px, 0.6vw, 6px);
}

.mobile-landscape-mode .canvas-wrapper {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.mobile-landscape-mode .multiplier-val {
  font-size: clamp(30px, 8.5vh, 56px);
}

.mobile-landscape-mode .partners-title {
  font-size: clamp(12px, 3vh, 18px);
}

.mobile-landscape-mode .partners-underline-track {
  width: clamp(100px, 20vw, 160px);
  height: clamp(2.5px, 0.6vh, 4px);
}

.mobile-landscape-mode .flew-away-text {
  font-size: clamp(11px, 2.5vh, 16px);
}

/* Dual Bet Controls Section in Fluid Landscape */
.mobile-landscape-mode .bet-controls-container {
  height: auto;
  min-height: clamp(84px, 23vh, 110px);
  gap: clamp(4px, 1vw, 8px);
}

.mobile-landscape-mode .bet-card {
  padding: clamp(12px, 2.5vh, 16px) clamp(4px, 1vw, 8px) clamp(4px, 1vh, 8px) clamp(4px, 1vw, 8px);
  position: relative;
}

.mobile-landscape-mode .toggle-panel-btn {
  top: 2px;
  right: 5px;
  z-index: 15;
}

.mobile-landscape-mode .toggle-panel-btn img {
  width: 14px;
  height: 14px;
}

.mobile-landscape-mode .stepper-box {
  height: clamp(22px, 4.5vh, 32px);
  max-width: clamp(95px, 16vw, 140px);
  padding: 1px clamp(3px, 0.5vw, 6px);
}

.mobile-landscape-mode .step-btn-circle {
  width: clamp(16px, 3.5vh, 24px);
  height: clamp(16px, 3.5vh, 24px);
}

.mobile-landscape-mode .bet-amount-input {
  width: auto;
  flex: 1;
  min-width: 0;
  padding: 0 2px;
  font-size: clamp(9px, 1.8vh, 12px);
}

.mobile-landscape-mode .quick-chips-grid {
  gap: clamp(2px, 0.4vh, 4px);
  max-width: clamp(80px, 14vw, 115px);
}

.mobile-landscape-mode .chip-btn-pill {
  padding: clamp(1.5px, 0.4vh, 4px) 0;
  font-size: clamp(8px, 1.6vh, 10px);
  max-width: clamp(38px, 6.5vw, 55px);
}

.mobile-landscape-mode .action-btn-green {
  height: clamp(46px, 14vh, 70px);
  max-width: clamp(95px, 16vw, 140px);
}

.mobile-landscape-mode .btn-title-main {
  font-size: clamp(13px, 3vh, 20px);
}

.mobile-landscape-mode .btn-sub-currency {
  font-size: clamp(8px, 1.6vh, 10px);
}

/* Modals & Popups Mobile Landscape Responsiveness */
.mobile-landscape-mode .menu-popup {
  top: clamp(28px, 6vh, 38px);
  right: 6px;
  width: clamp(210px, 35vw, 250px);
  padding: 6px 8px;
  gap: 3px;
  max-height: calc(100vh - 40px) !important;
  overflow-y: auto !important;
  z-index: 2000;
}

.mobile-landscape-mode .menu-profile-row {
  padding: 4px 8px;
  min-height: 32px;
  margin-bottom: 4px;
}

.mobile-landscape-mode .menu-profile-user .player-icon,
.mobile-landscape-mode #user-profile-avatar {
  width: 24px;
  height: 24px;
}

.mobile-landscape-mode .menu-username {
  font-size: 11px;
}

.mobile-landscape-mode .change-avatar-img-btn {
  height: 18px;
}

.mobile-landscape-mode .menu-item-row {
  padding: 4px 8px;
  font-size: 10.5px;
  border-radius: 6px;
}

.mobile-landscape-mode .menu-icon-img {
  width: 14px;
  height: 14px;
}

.mobile-landscape-mode .menu-divider-spacer {
  height: 4px;
}

.mobile-landscape-mode .toggle-switch {
  transform: scale(0.8);
  transform-origin: right center;
}

@media (max-height: 520px) {
  .menu-popup {
    max-height: calc(100vh - 36px) !important;
    top: 32px !important;
  }

  .bet-history-modal-container,
  .game-rules-modal-container,
  .how-to-play-modal-container,
  .pf-settings-modal-container,
  .avatar-modal-container,
  .free-bets-modal-container,
  .mode-selector-container {
    max-height: 92vh !important;
    max-width: 94vw !important;
    overflow-y: auto !important;
  }
}

/* ==========================================================================
   MOBILE & TABLET PORTRAIT RESPONSIVE SYSTEM
   Top: Flight Canvas container horizontally (Full Width, non-stretched)
   Bottom Left: Live Bets Panel
   Bottom Right: Bet Buttons (1 Column, 2 Rows if 2 bets; 1 block if 1 bet)
   ========================================================================== */

#game-container.portrait-mode {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.portrait-mode #game-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.portrait-mode .game-header {
  height: clamp(34px, 4.5vh, 40px);
  padding: 0 10px;
  flex-shrink: 0;
  background-size: cover !important;
}

.portrait-mode .game-body-landscape {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto minmax(170px, 35vh) 1fr;
  grid-template-areas:
    "history history"
    "canvas canvas"
    "live bets";
  gap: 6px;
  padding: 6px;
  height: calc(100% - clamp(34px, 4.5vh, 40px));
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.portrait-mode .game-main-column {
  display: contents;
}

/* History Bar: Full horizontal width across top */
.portrait-mode .history-bar-container {
  grid-area: history;
  height: clamp(24px, 3.5vh, 30px);
  width: 100%;
  border-radius: 6px;
  padding: 0 4px;
  background-size: cover !important;
}

.portrait-mode .history-item {
  font-size: clamp(9px, 1.4vh, 11px);
  padding: 1px 5px;
}

/* Canvas Wrapper: Full horizontal width across top */
.portrait-mode .canvas-wrapper {
  grid-area: canvas;
  width: 100%;
  height: 100%;
  min-height: 160px;
  border-radius: 8px;
  background-size: cover !important;
}

.portrait-mode .multiplier-val {
  font-size: clamp(32px, 7vh, 52px);
}

.portrait-mode .partners-center-text {
  left: calc(50% + 6px);
  transform: translate(-50%, -50%);
}

.portrait-mode .partners-title {
  font-size: clamp(12px, 2.5vh, 16px);
  text-align: center;
}

.portrait-mode .partners-underline-track {
  width: clamp(110px, 30vw, 150px);
  height: 3px;
}

.portrait-mode .flew-away-text {
  font-size: clamp(12px, 2.2vh, 15px);
}

/* Bottom Left: Live Bets Panel */
.portrait-mode .live-bets-panel {
  grid-area: live;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portrait-mode .bets-tab-header {
  height: clamp(24px, 3.5vh, 30px);
  padding: 2px;
  background-size: cover !important;
}

.portrait-mode .bets-tab {
  font-size: clamp(9px, 1.4vh, 10.5px);
  border-radius: 10px;
}

.portrait-mode .bets-sub-info {
  min-height: clamp(36px, 6vh, 48px);
  padding: 4px 6px;
  margin: 4px 3px 3px 3px;
  background-size: cover !important;
}

.portrait-mode .total-win-val {
  font-size: clamp(13px, 2.2vh, 17px);
}

.portrait-mode .bets-count-num {
  font-size: clamp(11px, 1.8vh, 14px);
}

.portrait-mode .bets-count-label,
.portrait-mode .total-win-text {
  font-size: clamp(9px, 1.4vh, 11.5px);
}

.portrait-mode .table-head-row,
.portrait-mode .table-row-item {
  padding: 3px 4px;
  font-size: clamp(8.5px, 1.4vh, 10px);
  grid-template-columns: 2fr 1.5fr 1.2fr 1.8fr;
  gap: 2px;
}

.portrait-mode .player-cell {
  gap: 3px;
}

.portrait-mode .player-icon {
  width: 12px;
  height: 12px;
  font-size: 7px;
}

.portrait-mode .panel-footer-spribe {
  padding: 4px 6px;
  font-size: 9px;
}

.portrait-mode .fair-icon {
  width: 10px;
  height: 10px;
  object-fit: contain;
}

/* Bottom Right: Bet Controls Container (1 Column, 2 Rows for dual bets; 1 row for single bet) */
.portrait-mode .bet-controls-container {
  grid-area: bets;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
}

.portrait-mode .bet-card {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #0b0e20 url('./assets/betcontainerbg.png') no-repeat center center / cover !important;
  border-radius: 8px;
  padding: 6px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Single Panel Active on Portrait */
.portrait-mode .bet-controls-container.single-panel #bet-panel-1 {
  flex: 1;
  height: 100%;
  max-width: 100%;
  width: 100%;
}

.portrait-mode .bet-body-flex {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.portrait-mode .bet-left-column {
  display: contents;
}

.portrait-mode .stepper-box {
  order: 1;
  height: 36px !important;
  max-height: 36px !important;
  max-width: 160px;
  width: 100%;
  padding: 2px 6px;
  box-sizing: border-box;
  background-size: 100% 100% !important;
  background-position: center !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portrait-mode .bet-amount-input {
  width: 100%;
  min-width: 0;
  text-align: center;
  font-size: 13.5px;
  font-weight: 800;
}

.portrait-mode .step-btn-circle {
  width: 27px !important;
  height: 27px !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-mode .step-btn-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Quick Chips: 4 buttons in 1 horizontal row in the MIDDLE (Order 2) */
.portrait-mode .quick-chips-grid {
  order: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  max-width: 160px;
  width: 100%;
  margin: 3px 0;
}

.portrait-mode .chip-btn-pill {
  height: 27px !important;
  line-height: 27px;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border-radius: 6px;
  background-size: 100% 100% !important;
}

/* Bet Action Button: Larger Squarish button placed at the BOTTOM (Order 3) */
.portrait-mode .action-btn-green {
  order: 3;
  width: 145px !important;
  max-width: 145px !important;
  height: 58px !important;
  max-height: 58px !important;
  aspect-ratio: auto;
  align-self: center;
  margin: 3px 0 0 0;
  background-size: 100% 100% !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
}

.portrait-mode .btn-title-main {
  font-size: 17.5px;
  line-height: 1.1;
  font-weight: 800;
}

.portrait-mode .btn-sub-currency {
  font-size: 10.5px;
  line-height: 1.1;
  margin-top: 2px;
}

.portrait-mode .toggle-panel-btn {
  top: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 20;
}

.portrait-mode .toggle-panel-btn img {
  width: 18px !important;
  height: 18px !important;
  object-fit: contain;
}

.portrait-mode .bet-controls-container.single-panel #toggle-panel-1-btn {
  right: -2px;
  top: -2px;
}

/* Ensure no image tag stretches */
.portrait-mode img {
  object-fit: contain;
}

/* Modals & Popups in Portrait Mode */
.portrait-mode .menu-popup {
  top: clamp(34px, 4.5vh, 40px);
  right: 6px;
  width: clamp(230px, 70vw, 265px);
  max-height: calc(100vh - 45px) !important;
  z-index: 2000;
}

.portrait-mode .avatar-modal-container,
.portrait-mode .free-bets-modal-container,
.portrait-mode .bet-history-modal-container,
.portrait-mode .how-to-play-modal-container,
.portrait-mode .game-rules-modal-container,
.portrait-mode .mode-selector-container,
.portrait-mode .pf-settings-modal-container {
  max-width: 92vw !important;
  max-height: 88vh !important;
  overflow-y: auto !important;
}

/* ==========================================================================
   TABLET & LARGE DISPLAY PORTRAIT OPTIMIZATIONS (iPad, iPad Mini, Air, Pro, Surface Pro 7)
   ========================================================================== */
@media (min-width: 600px) {
  .portrait-mode .game-header {
    height: 48px;
    padding: 0 16px;
  }

  .portrait-mode .header-balance {
    font-size: 20px;
  }

  .portrait-mode .header-currency {
    font-size: 15px;
  }

  .portrait-mode .menu-circle-btn {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  /* Menu Popup Scaling for Tablets */
  .portrait-mode .menu-popup {
    top: 52px;
    right: 16px;
    width: clamp(300px, 42vw, 360px);
    padding: 14px 16px;
    gap: 8px;
    border-radius: 14px;
  }

  .portrait-mode .menu-profile-row {
    padding: 12px 16px;
    min-height: 50px;
  }

  .portrait-mode .menu-profile-user .player-icon,
  .portrait-mode #user-profile-avatar {
    width: 40px;
    height: 40px;
  }

  .portrait-mode .menu-username {
    font-size: 15.5px;
  }

  .portrait-mode .change-avatar-img-btn {
    height: 28px;
  }

  .portrait-mode .menu-item-row {
    padding: 12px 16px;
    font-size: 14.5px;
    min-height: 44px;
    border-radius: 10px;
  }

  .portrait-mode .menu-icon-img {
    width: 22px;
    height: 22px;
  }

  .portrait-mode .toggle-switch {
    width: 42px;
    height: 22px;
  }

  .portrait-mode .toggle-slider:before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
  }

  .portrait-mode input:checked+.toggle-slider:before {
    transform: translateX(20px);
  }

  /* ALL MODALS & POPUPS TABLET SCALING (iPad Mini, iPad Air, Surface Pro 7) */
  .portrait-mode .avatar-modal-container,
  .portrait-mode .free-bets-modal-container,
  .portrait-mode .bet-history-modal-container,
  .portrait-mode .how-to-play-modal-container,
  .portrait-mode .game-rules-modal-container,
  .portrait-mode .mode-selector-container,
  .portrait-mode .pf-settings-modal-container {
    width: clamp(520px, 78vw, 650px) !important;
    max-width: 90vw !important;
    max-height: 85vh !important;
    padding: 18px 22px;
    border-radius: 16px;
  }

  .portrait-mode .avatar-modal-header,
  .portrait-mode .free-bets-modal-header,
  .portrait-mode .bet-history-modal-header,
  .portrait-mode .how-to-play-modal-header,
  .portrait-mode .game-rules-modal-header {
    padding: 14px 18px;
    margin: -18px -22px 16px -22px;
  }

  .portrait-mode .avatar-modal-header h2,
  .portrait-mode .free-bets-modal-header h2,
  .portrait-mode .bet-history-modal-header h2,
  .portrait-mode .how-to-play-modal-header span,
  .portrait-mode .game-rules-modal-header span {
    font-size: 19px;
    font-weight: 700;
  }

  .portrait-mode .avatar-modal-close,
  .portrait-mode .free-bets-modal-close,
  .portrait-mode .bet-history-modal-close,
  .portrait-mode .how-to-play-modal-close,
  .portrait-mode .game-rules-modal-close {
    width: 32px;
    height: 32px;
    font-size: 16px;
    right: 14px;
  }

  .portrait-mode .free-bets-modal-close img,
  .portrait-mode .bet-history-modal-close img,
  .portrait-mode .how-to-play-modal-close img,
  .portrait-mode .game-rules-modal-close img {
    width: 24px !important;
    height: 24px !important;
  }

  .portrait-mode .avatar-item {
    width: 50px;
    height: 50px;
  }

  .portrait-mode .avatar-grid {
    gap: 12px;
    max-height: 65vh;
  }

  .portrait-mode .bet-history-table-header,
  .portrait-mode .bet-history-row {
    font-size: 14.5px;
    padding: 10px 14px;
  }

  .portrait-mode .game-rules-desc,
  .portrait-mode .game-rules-remember-text,
  .portrait-mode .game-rules-bullet-list li,
  .portrait-mode .how-to-play-step-row .step-text,
  .portrait-mode .mode-selector-intro {
    font-size: 15px;
    line-height: 1.5;
  }

  .portrait-mode .game-rules-section-title,
  .portrait-mode .game-rules-main-title {
    font-size: 18px;
  }

  .portrait-mode .game-rules-sub-heading {
    font-size: 16px;
  }

  .portrait-mode .detailed-rules-btn {
    height: 44px;
    font-size: 15px;
    border-radius: 10px;
  }

  .portrait-mode .mode-select-card {
    padding: 16px;
    border-radius: 14px;
  }

  .portrait-mode .mode-card-title {
    font-size: 18px;
  }

  .portrait-mode .mode-action-btn {
    height: 44px;
    font-size: 15px;
  }

  .portrait-mode .game-body-landscape {
    gap: 10px;
    padding: 10px;
    height: calc(100% - 48px);
  }

  .portrait-mode .history-bar-container {
    height: 38px;
    padding: 0 8px;
    border-radius: 8px;
  }

  .portrait-mode .history-item {
    font-size: 13.5px;
    padding: 3px 9px;
    border-radius: 6px;
  }

  .portrait-mode .canvas-wrapper {
    min-height: 240px;
  }

  .portrait-mode .multiplier-val {
    font-size: clamp(52px, 8.5vh, 76px);
  }

  .portrait-mode .partners-title {
    font-size: clamp(18px, 3vh, 24px);
  }

  .portrait-mode .partners-underline-track {
    width: 200px;
    height: 4px;
  }

  .portrait-mode .flew-away-text {
    font-size: clamp(18px, 2.8vh, 24px);
  }

  /* Live Bets Panel Scaling for Tablets */
  .portrait-mode .bets-tab-header {
    height: 36px;
    padding: 3px;
  }

  .portrait-mode .bets-tab {
    font-size: 13px;
  }

  .portrait-mode .bets-sub-info {
    min-height: 54px;
    padding: 6px 12px;
  }

  .portrait-mode .total-win-val {
    font-size: 20px;
  }

  .portrait-mode .bets-count-num {
    font-size: 16px;
  }

  .portrait-mode .bets-count-label,
  .portrait-mode .total-win-text {
    font-size: 13px;
  }

  .portrait-mode .table-head-row,
  .portrait-mode .table-row-item {
    padding: 6px 8px;
    font-size: 12px;
    gap: 4px;
  }

  .portrait-mode .player-icon {
    width: 16px;
    height: 16px;
    font-size: 9px;
  }

  .portrait-mode .panel-footer-spribe {
    padding: 8px 10px;
    font-size: 12px;
  }

  .portrait-mode .fair-icon {
    width: 14px;
    height: 14px;
  }

  /* Bet Cards Sizing for Tablets */
  .portrait-mode .bet-card {
    padding: 10px;
    border-radius: 10px;
  }

  .portrait-mode .bet-body-flex {
    gap: 6px;
  }

  .portrait-mode .toggle-panel-btn {
    top: 0px;
    right: 0px;
    width: 24px;
    height: 24px;
  }

  .portrait-mode .toggle-panel-btn img {
    width: 20px !important;
    height: 20px !important;
  }

  .portrait-mode .stepper-box {
    max-width: 210px;
    width: 85%;
    height: 42px !important;
    max-height: 42px !important;
    padding: 3px 8px;
  }

  .portrait-mode .bet-amount-input {
    font-size: 16.5px;
  }

  .portrait-mode .step-btn-circle {
    width: 32px !important;
    height: 32px !important;
  }

  .portrait-mode .quick-chips-grid {
    max-width: 210px;
    width: 85%;
    gap: 6px;
    margin: 4px 0;
  }

  .portrait-mode .chip-btn-pill {
    height: 34px !important;
    line-height: 34px;
    font-size: 13px;
    border-radius: 8px;
  }

  .portrait-mode .action-btn-green {
    width: 200px !important;
    max-width: 200px !important;
    height: 68px !important;
    max-height: 68px !important;
    margin: 4px 0 0 0;
    border-radius: 12px;
  }

  .portrait-mode .btn-title-main {
    font-size: 22px;
  }

  .portrait-mode .btn-sub-currency {
    font-size: 12.5px;
    margin-top: 2px;
  }
}

@media (min-width: 850px) {
  .portrait-mode .game-header {
    height: 54px;
    padding: 0 20px;
  }

  .portrait-mode .header-balance {
    font-size: 22px;
  }

  .portrait-mode .header-currency {
    font-size: 16px;
  }

  .portrait-mode .menu-circle-btn {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }

  /* Menu Popup Scaling for Large Tablets (iPad Pro, Surface Pro 7) */
  .portrait-mode .menu-popup {
    top: 58px;
    right: 20px;
    width: 400px;
    padding: 16px 18px;
    gap: 10px;
    border-radius: 16px;
  }

  .portrait-mode .menu-profile-row {
    padding: 14px 18px;
    min-height: 56px;
  }

  .portrait-mode .menu-profile-user .player-icon,
  .portrait-mode #user-profile-avatar {
    width: 46px;
    height: 46px;
  }

  .portrait-mode .menu-username {
    font-size: 17px;
  }

  .portrait-mode .change-avatar-img-btn {
    height: 32px;
  }

  .portrait-mode .menu-item-row {
    padding: 14px 18px;
    font-size: 16px;
    min-height: 48px;
    border-radius: 10px;
  }

  .portrait-mode .menu-icon-img {
    width: 24px;
    height: 24px;
  }

  .portrait-mode .toggle-switch {
    width: 46px;
    height: 24px;
  }

  .portrait-mode .toggle-slider:before {
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
  }

  .portrait-mode input:checked+.toggle-slider:before {
    transform: translateX(22px);
  }

  /* ALL MODALS & POPUPS LARGE TABLET SCALING (iPad Pro 12.9", Surface Pro 7) */
  .portrait-mode .avatar-modal-container,
  .portrait-mode .free-bets-modal-container,
  .portrait-mode .bet-history-modal-container,
  .portrait-mode .how-to-play-modal-container,
  .portrait-mode .game-rules-modal-container,
  .portrait-mode .mode-selector-container {
    width: clamp(620px, 75vw, 760px) !important;
    max-width: 88vw !important;
    max-height: 85vh !important;
    padding: 22px 26px;
    border-radius: 20px;
  }

  /* PROVABLY FAIR SETTINGS MODAL PORTRAIT RESPONSIVE SYSTEM */
  .portrait-mode .pf-settings-modal-container {
    width: clamp(300px, 92vw, 540px) !important;
    max-width: 92vw !important;
    max-height: 88vh !important;
    padding: 0 !important;
    border-radius: 14px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .portrait-mode .pf-settings-modal-header {
    padding: 12px 16px !important;
    margin: 0 !important;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
    flex-shrink: 0 !important;
  }

  .portrait-mode .pf-settings-modal-header span {
    font-size: 15px !important;
    font-weight: 700 !important;
  }

  .portrait-mode .pf-settings-modal-close {
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .portrait-mode .pf-settings-modal-close img {
    width: 18px !important;
    height: 18px !important;
  }

  .portrait-mode .pf-settings-modal-body {
    padding: 12px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    overflow-y: auto !important;
    flex: 1 !important;
    box-sizing: border-box !important;
  }

  .portrait-mode .pf-notice-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }

  .portrait-mode .pf-notice-text {
    max-width: 100% !important;
    font-size: 11.5px !important;
    line-height: 1.4 !important;
  }

  .portrait-mode .pf-what-is-btn {
    align-self: flex-start !important;
    padding: 5px 12px !important;
    font-size: 11px !important;
  }

  .portrait-mode .pf-section {
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .portrait-mode .pf-section-title {
    font-size: 13px !important;
  }

  .portrait-mode .pf-section-sub {
    font-size: 10.5px !important;
    line-height: 1.35 !important;
  }

  .portrait-mode .pf-radio-group {
    gap: 8px !important;
    width: 100% !important;
  }

  .portrait-mode .pf-radio-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .portrait-mode .pf-radio-label {
    width: 100% !important;
    font-size: 12.5px !important;
  }

  .portrait-mode .pf-seed-box,
  .portrait-mode .pf-seed-box.manual-box {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 10px !important;
  }

  .portrait-mode .pf-seed-val {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11.5px !important;
  }

  .portrait-mode .pf-manual-input {
    flex: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    font-size: 11.5px !important;
  }

  .portrait-mode .pf-change-btn {
    padding: 5px 12px !important;
    font-size: 11.5px !important;
    flex-shrink: 0 !important;
  }

  .portrait-mode .pf-server-seed-container {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
  }

  .portrait-mode .pf-server-hash-input {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 11px !important;
    word-break: break-all !important;
    white-space: normal !important;
  }

  .portrait-mode .pf-settings-modal-footer {
    padding: 10px 14px !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    flex-shrink: 0 !important;
  }

  .portrait-mode .avatar-modal-header,
  .portrait-mode .free-bets-modal-header,
  .portrait-mode .bet-history-modal-header,
  .portrait-mode .how-to-play-modal-header,
  .portrait-mode .game-rules-modal-header {
    padding: 16px 22px;
    margin: -22px -26px 18px -26px;
  }

  .portrait-mode .avatar-modal-header h2,
  .portrait-mode .free-bets-modal-header h2,
  .portrait-mode .bet-history-modal-header h2,
  .portrait-mode .how-to-play-modal-header span,
  .portrait-mode .game-rules-modal-header span {
    font-size: 22px;
  }

  .portrait-mode .avatar-modal-close,
  .portrait-mode .free-bets-modal-close,
  .portrait-mode .bet-history-modal-close,
  .portrait-mode .how-to-play-modal-close,
  .portrait-mode .game-rules-modal-close {
    width: 36px;
    height: 36px;
    font-size: 18px;
    right: 18px;
  }

  .portrait-mode .free-bets-modal-close img,
  .portrait-mode .bet-history-modal-close img,
  .portrait-mode .how-to-play-modal-close img,
  .portrait-mode .game-rules-modal-close img {
    width: 28px !important;
    height: 28px !important;
  }

  .portrait-mode .avatar-item {
    width: 58px;
    height: 58px;
  }

  .portrait-mode .avatar-grid {
    gap: 14px;
  }

  .portrait-mode .bet-history-table-header,
  .portrait-mode .bet-history-row {
    font-size: 16px;
    padding: 12px 16px;
  }

  .portrait-mode .game-rules-desc,
  .portrait-mode .game-rules-remember-text,
  .portrait-mode .game-rules-bullet-list li,
  .portrait-mode .how-to-play-step-row .step-text,
  .portrait-mode .mode-selector-intro {
    font-size: 16.5px;
    line-height: 1.5;
  }

  .portrait-mode .game-rules-section-title,
  .portrait-mode .game-rules-main-title {
    font-size: 20px;
  }

  .portrait-mode .game-rules-sub-heading {
    font-size: 18px;
  }

  .portrait-mode .detailed-rules-btn {
    height: 50px;
    font-size: 16.5px;
    border-radius: 12px;
  }

  .portrait-mode .mode-select-card {
    padding: 20px;
    border-radius: 16px;
  }

  .portrait-mode .mode-card-title {
    font-size: 20px;
  }

  .portrait-mode .mode-action-btn {
    height: 50px;
    font-size: 16.5px;
  }

  .portrait-mode .history-bar-container {
    height: 46px;
    padding: 0 10px;
  }

  .portrait-mode .history-item {
    font-size: 15px;
    padding: 4px 12px;
  }

  .portrait-mode .table-head-row,
  .portrait-mode .table-row-item {
    padding: 8px 12px;
    font-size: 13.5px;
  }

  .portrait-mode .bets-tab {
    font-size: 14.5px;
  }

  .portrait-mode .total-win-val {
    font-size: 24px;
  }

  .portrait-mode .bets-count-num {
    font-size: 18px;
  }

  .portrait-mode .bets-count-label,
  .portrait-mode .total-win-text {
    font-size: 14px;
  }

  .portrait-mode .toggle-panel-btn {
    top: 0px;
    right: 0px;
    width: 28px;
    height: 28px;
  }

  .portrait-mode .toggle-panel-btn img {
    width: 22px !important;
    height: 22px !important;
  }

  .portrait-mode .stepper-box {
    max-width: 250px;
    width: 85%;
    height: 48px !important;
    max-height: 48px !important;
    padding: 4px 10px;
  }

  .portrait-mode .bet-amount-input {
    font-size: 19px;
  }

  .portrait-mode .step-btn-circle {
    width: 36px !important;
    height: 36px !important;
  }

  .portrait-mode .quick-chips-grid {
    max-width: 250px;
    width: 85%;
    gap: 8px;
    margin: 6px 0;
  }

  .portrait-mode .chip-btn-pill {
    height: 40px !important;
    line-height: 40px;
    font-size: 14.5px;
    border-radius: 8px;
  }

  .portrait-mode .action-btn-green {
    width: 240px !important;
    max-width: 240px !important;
    height: 78px !important;
    max-height: 78px !important;
    margin: 6px 0 0 0;
    border-radius: 14px;
  }

  .portrait-mode .btn-title-main {
    font-size: 26px;
  }

  .portrait-mode .btn-sub-currency {
    font-size: 14px;
    margin-top: 3px;
  }
}

/* ==========================================================================
   LIVE SERVER STATUS OVERLAY (Disconnected / Reconnecting State)
   ========================================================================== */
.server-status-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 10, 16, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.server-status-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.server-status-card {
  background: linear-gradient(135deg, rgba(35, 12, 18, 0.95) 0%, rgba(16, 7, 12, 0.95) 100%);
  border: 1px solid rgba(229, 57, 53, 0.7);
  box-shadow: 0 12px 35px rgba(229, 57, 53, 0.35), 0 4px 20px rgba(0, 0, 0, 0.85);
  border-radius: 14px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 90%;
  animation: serverCardPulse 2s infinite ease-in-out;
}

@keyframes serverCardPulse {
  0%, 100% {
    box-shadow: 0 12px 35px rgba(229, 57, 53, 0.35), 0 4px 20px rgba(0, 0, 0, 0.85);
    border-color: rgba(229, 57, 53, 0.7);
  }
  50% {
    box-shadow: 0 16px 45px rgba(229, 57, 53, 0.65), 0 4px 20px rgba(0, 0, 0, 0.95);
    border-color: rgba(229, 57, 53, 1);
  }
}

.server-status-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(229, 57, 53, 0.25);
  border-top: 3px solid #e53935;
  border-radius: 50%;
  animation: serverSpin 1s linear infinite;
  flex-shrink: 0;
}

@keyframes serverSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.server-status-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.server-status-title {
  color: #ff4d4d;
  font-family: 'Outfit', 'Roboto', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.server-status-sub {
  color: #94a3b8;
  font-family: 'Outfit', 'Roboto', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11.5px;
}

.portrait-mode .server-status-card {
  padding: 12px 18px;
  gap: 12px;
}

.portrait-mode .server-status-title {
  font-size: 12.5px;
}

.portrait-mode .server-status-sub {
  font-size: 10.5px;
}