/*!******************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js!./css/styles.css ***!
  \******************************************************************/
:root {
  --ink: #071426;
  --night: #071433;
  --deep: #101827;
  --panel: rgba(17, 26, 43, 0.91);
  --panel-border: rgba(96, 174, 207, 0.28);
  --text: #f4f7fb;
  --muted: #8fa5b7;
  --cyan: #00ffee;
  --green: #40e26d;
  --green-dark: #0f8f3c;
  --gold: #ffc72c;
  --danger: #ff5a66;
  --font: "Montserrat", Arial, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--night);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button {
  color: inherit;
  background: transparent;
  background-color: transparent;
  border: 0;
}

#gameShell {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 15%, #123a72 0%, #071433 52%, #030815 100%);
}

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.scene-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(1, 6, 18, 0.38) 0%, transparent 20%, transparent 73%, rgba(0, 5, 14, 0.55) 100%),
    radial-gradient(ellipse at center, transparent 48%, rgba(0, 5, 16, 0.34) 100%);
}

.bottom-fade {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26vh;
  background: linear-gradient(180deg, transparent, rgba(2, 8, 20, 0.34) 42%, rgba(1, 5, 13, 0.78));
}

/* Header */
.game-header {
  position: absolute;
  z-index: 30;
  top: max(16px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: auto;
}

.brand {
  width: clamp(142px, 15vw, 226px);
  height: auto;
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.42));
  transform-origin: left top;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.icon-button {
  position: relative;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(6, 14, 29, 0.52);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: rgba(12, 29, 52, 0.72);
}

.icon-button:active { transform: translateY(1px) scale(0.98); }

.menu-button span {
  display: block;
  width: 22px;
  height: 3px;
  margin: 4px auto;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

/* Bottom controls — 100% asset-driven betting panel matching game reference images */
.control-bar {
  position: absolute;
  z-index: 35;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(940px, calc(100vw - 24px));
  transform: translateX(-50%);
  pointer-events: none;
}

.control-panel {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  height: 82px;
  padding: 8px 14px;
  border: 0;
  border-radius: 18px;
  background: url(../assets/ui/bar_bg.png) center / 100% 100% no-repeat;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.45));
  gap: 8px;
  box-sizing: border-box;
}

.panel-cell {
  position: relative;
  display: flex;
  aspect-ratio: 2 / 1;
  border: 0;
  border-radius: 10px;
  background-color: transparent !important;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  box-sizing: border-box;
  text-align: left;
}

/* 1. BALANCE (far left corner) - 2:1 ratio */
.balance-cell {
  flex: 0 0 128px;
  width: 128px;
  height: 64px;
  aspect-ratio: 2 / 1;
  background-color: transparent !important;
  background-image: url(../assets/ui/ballanceDesktop.png);
  flex-direction: column;
  justify-content: center;
  padding: 6px 14px;
  gap: 2px;
}

/* 2. CASHOUT (beside bet button, separated from balance by huge gap) - 2:1 ratio */
.cashout-cell {
  margin-left: auto;
  flex: 0 0 128px;
  width: 128px;
  height: 64px;
  aspect-ratio: 2 / 1;
  background-color: transparent !important;
  background-image: url(../assets/ui/cashoutDesktopDisable.png);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6px 10px;
  gap: 2px;
  cursor: pointer;
}

.cashout-cell:not(:disabled) {
  background-color: transparent !important;
  background-image: url(../assets/ui/cashoutdesktop.png);
}

.cashout-cell:not(:disabled) .cell-label { color: rgba(255, 255, 255, 0.9); }
.cashout-cell:not(:disabled) .cell-value { color: #ffffff; }
.cashout-cell:disabled { cursor: default; }

/* 3. BET (beside cashout, left side of play button, larger, 2:1 ratio) */
.bet-cell {
  flex: 0 0 144px;
  width: 144px;
  height: 72px;
  aspect-ratio: 2 / 1;
  margin-right: -13px;
  background-image: url(../assets/ui/betDesktop.png);
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 0;
  position: relative;
  z-index: 2;
}

.bet-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 2px 2px 2px 14px;
  flex: 1;
  min-width: 0;
}

#betInput {
  width: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0;
  margin: 0;
}

/* Stepper columns: centered up/down arrows */
.bet-steppers {
  display: flex;
  flex-direction: column;
  width: 28px;
  height: 52px;
  gap: 3px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 4;
}

.step-button {
  width: 28px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  color: #ffffff;
  transition: background 120ms ease, color 120ms ease, transform 100ms ease;
  -webkit-tap-highlight-color: transparent;
}

.step-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  color: #34d399;
}

.step-button:active:not(:disabled) {
  background: rgba(16, 185, 129, 0.3);
  color: #10b981;
  transform: scale(0.9);
}

.step-button:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
}

.step-icon {
  display: block;
  width: 13px;
  height: 9px;
  pointer-events: none;
}

/* 4. PLAY BUTTON (green orb with play icon in center) */
.go-button {
  position: relative;
  z-index: 3;
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  margin: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
  transition: filter 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

.go-button:hover:not(:disabled) { filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55)); }
.go-button:active:not(:disabled) { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)); }
.go-button:disabled { cursor: default; opacity: 0.68; }

.go-orb {
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
}

.go-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: auto;
  transform: translate(-42%, -50%);
  object-fit: contain;
  pointer-events: none;
}

#goText {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  transform: translate(-50%, -50%);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 6px rgba(0, 50, 16, 0.6);
}

.go-button.in-round .go-icon { display: none; }
.go-button.in-round #goText { display: block; }

/* 5. DIFFICULTY (right side of play button, larger, 2:1 ratio) */
.difficulty-cell {
  flex: 0 0 144px;
  width: 144px;
  height: 72px;
  aspect-ratio: 2 / 1;
  margin-left: -13px;
  background-image: url(../assets/ui/difficultyDesktop.png);
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 16px;
  position: relative;
  z-index: 2;
}

.difficulty-steppers {
  display: flex;
  flex-direction: column;
  width: 28px;
  height: 52px;
  gap: 3px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 4;
}

.difficulty-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
  padding: 2px 14px 2px 2px;
}

.difficulty-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: right;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

#difficultyValue {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.03em;
}

/* Typography & Coin Icons */
.cell-label {
  display: block;
  color: #8c99ac;
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 1px;
}

.cell-value {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.coin-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff28d 0%, #f6b418 55%, #b56c00 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  color: #522d00;
  font-family: 'Montserrat', sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.last-win-bar {
  display: none;
}

.preset-menu,
.difficulty-menu {
  pointer-events: auto;
  position: absolute;
  z-index: 40;
  bottom: calc(100% + 10px);
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #161922;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.difficulty-menu {
  right: 0;
  width: 175px;
}

.diff-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a6adb9;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}

.diff-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.diff-option.active {
  background: rgba(37, 224, 118, 0.1);
  color: #ffffff;
}

.diff-check {
  display: none;
  color: #25e076;
  font-size: 14px;
  font-weight: 900;
}

.diff-option.active .diff-check {
  display: inline-block;
}

.space-hint {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 126px;
  transform: translateX(-50%);
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.space-hint span {
  display: inline-block;
  margin-right: 7px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

/* Banners and modal */
.hidden { display: none !important; }

.win-banner {
  position: absolute;
  z-index: 45;
  top: 14%;
  left: 50%;
  width: min(340px, 84vw);
  transform: translateX(-50%);
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.45));
  animation: bannerIn 480ms cubic-bezier(.17, .89, .32, 1.28) both;
  pointer-events: none;
}

.win-banner img,
.win-banner-img {
  display: block;
  width: 100%;
  height: auto;
}

.win-copy {
  position: absolute;
  inset: 0;
  display: block;
  box-sizing: border-box;
}

.win-copy strong,
#bannerTitle {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(12px, 3.4vw, 15px);
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.banner-amount-row {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 90%;
}

.win-copy span#bannerAmount {
  margin: 0;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(20px, 5.5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.win-coin-icon {
  width: clamp(16px, 4.2vw, 20px);
  height: clamp(16px, 4.2vw, 20px);
  font-size: clamp(9px, 2.4vw, 11px);
  font-weight: 700;
  flex-shrink: 0;
}

.round-message {
  --result-accent: #45ff9b;
  --result-accent-soft: rgba(69, 255, 155, 0.24);
  --result-panel-top: rgba(8, 91, 88, 0.98);
  --result-panel-bottom: rgba(4, 36, 51, 0.98);
  position: absolute;
  z-index: 45;
  top: max(64px, 13%);
  left: 50%;
  box-sizing: border-box;
  width: min(370px, 86vw);
  transform: translateX(-50%);
  padding: 24px 28px 26px;
  overflow: hidden;
  border: 2px solid var(--result-accent);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 0%, var(--result-accent-soft), transparent 46%),
    linear-gradient(180deg, var(--result-panel-top), var(--result-panel-bottom));
  box-shadow:
    0 0 0 5px rgba(2, 13, 25, 0.48),
    0 24px 70px rgba(0, 0, 0, 0.58),
    0 0 42px var(--result-accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  text-align: center;
  animation: bannerIn 400ms cubic-bezier(.17,.89,.32,1.25) both;
  pointer-events: none;
}

.round-message.is-loss {
  --result-accent: #ff6b57;
  --result-accent-soft: rgba(255, 77, 61, 0.26);
  --result-panel-top: rgba(105, 25, 34, 0.98);
  --result-panel-bottom: rgba(43, 12, 25, 0.98);
}

.result-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  place-items: center;
  border: 2px solid var(--result-accent);
  border-radius: 50%;
  color: #07182a;
  background: var(--result-accent);
  box-shadow: 0 0 28px var(--result-accent-soft);
}

.result-icon svg {
  width: 29px;
  height: 29px;
}

.result-loss-icon,
.round-message.is-loss .result-win-icon { display: none; }
.round-message.is-loss .result-loss-icon { display: block; }

.round-message .result-kicker {
  display: block;
  margin: 0 0 5px;
  color: var(--result-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.round-message .result-title {
  display: block;
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
}

.result-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  margin: 14px auto 10px;
  color: var(--result-accent);
  font-size: clamp(30px, 7vw, 42px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 22px var(--result-accent-soft);
}

.result-sign { font-size: 0.68em; }
.result-currency { font-size: 0.62em; }

.round-message .result-description {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  opacity: 0.88;
}

@media (max-height: 560px) {
  .round-message {
    top: 8%;
    width: min(340px, 82vw);
    padding: 16px 24px 18px;
  }
  .result-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 8px;
  }
  .result-icon svg { width: 23px; height: 23px; }
  .round-message .result-title { font-size: 28px; }
  .result-amount { margin: 9px auto 7px; font-size: 31px; }
  .round-message .result-description { font-size: 12px; }
}

@keyframes bannerIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(0.88); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.modal-backdrop {
  position: absolute;
  z-index: 60;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(3px);
}

.modal {
  position: absolute;
  z-index: 65;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100vw - 34px));
  max-height: min(760px, calc(100vh - 38px));
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: 34px 44px 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: #17181d;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
}

.modal h2 {
  margin: 0 52px 22px 0;
  color: #fff;
  font-size: 28px;
  font-weight: 500;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
}

.help-modal ol {
  margin: 0;
  padding-left: 32px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.46;
}

.help-modal li { margin: 0 0 22px; padding-left: 8px; }
.help-modal li::marker { font-weight: 900; }
.help-modal strong { display: block; margin: 8px 0 7px; font-weight: 800; }
.help-modal ul { margin: 0; padding-left: 23px; }
.help-modal li li { margin: 4px 0; padding-left: 3px; }

.menu-modal { width: min(430px, calc(100vw - 34px)); }
.menu-modal h2 { margin-right: 42px; }

.menu-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  margin: 10px 0;
  padding: 0 0 0 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.menu-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.menu-option i {
  position: relative;
  width: 58px;
  height: 31px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 180ms ease;
}

.menu-option i::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 5px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease;
}

.menu-option input:checked + i { background: var(--green); }
.menu-option input:checked + i::after { transform: translateX(25px); }

.ghost-button {
  width: 100%;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.ghost-button:hover { background: rgba(255, 255, 255, 0.11); }

.menu-note {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* Loader — logo in the upper-middle, indicator below it */
#loader {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  background: #071433;
}

.loader-bg {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 50% 18%, rgba(23, 83, 151, 0.9), transparent 34%),
    linear-gradient(180deg, #102e71 0%, #071433 58%, #020713 100%);
  animation: loaderDrift 8s ease-in-out infinite alternate;
}

@keyframes loaderDrift {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.07) translateY(-8px); }
}

.loader-logo {
  position: relative;
  z-index: 2;
  margin-top: 17vh;
  width: min(300px, 62vw);
  filter: drop-shadow(0 15px 24px rgba(0, 0, 0, 0.42));
}

.loader-track {
  position: relative;
  z-index: 2;
  width: min(300px, 60vw);
  height: 8px;
  margin-top: 32px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

#loaderBar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 20px rgba(0, 255, 238, 0.55);
  transition: width 180ms ease;
}

.loader-copy {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.loader-copy span {
  min-width: 44px;
  color: var(--cyan);
  text-align: right;
  font-weight: 900;
}



/* INOUT Floating Hamburger Menu matching Screenshot (85).png */
.menu-panel {
  position: absolute;
  z-index: 70;
  top: calc(max(16px, env(safe-area-inset-top)) + 58px);
  right: max(18px, env(safe-area-inset-right));
  width: min(310px, calc(100vw - 24px));
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 16px 18px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: #161822;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  animation: menuDrop 180ms ease;
}

@keyframes menuDrop {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

.menu-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #252a3a;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

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

.user-name {
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.change-avatar-btn {
  background: transparent;
  border: 0;
  padding: 2px 0 0;
  color: #7b849b;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: color 150ms ease;
}

.change-avatar-btn:hover {
  color: #00ffee;
}

.menu-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease;
}

.menu-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c4cad8;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}

.menu-item-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

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

.menu-item-icon {
  color: #8e97af;
  flex-shrink: 0;
}

.menu-item-btn:hover .menu-item-icon {
  color: #ffffff;
}

.menu-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 6px;
  color: #c4cad8;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
}

/* Switch Toggle matching Screenshot (85).png */
.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #3b4154;
  transition: background-color 200ms ease;
  border-radius: 24px;
}

.switch-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.switch-control input:checked + .switch-slider {
  background-color: #25e076;
}

.switch-control input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.menu-divider {
  border: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

.menu-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 6px;
}

.powered-by {
  color: #6d758c;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inout-badge {
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.02em;
  font-size: 13px;
}

.inout-in {
  background: #f7b500;
  color: #111;
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 2px;
}

.inout-out {
  color: #ffffff;
}

/* Modals */
.modal-overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.game-modal {
  width: min(520px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: #181b26;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  animation: modalScaleIn 200ms ease;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.modal-desc {
  font-size: 13px;
  color: #9ba3b8;
  margin-bottom: 16px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #7e879f;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-input {
  width: 100%;
  padding: 10px 14px;
  background: #10121a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #00ffee;
  font-family: monospace;
  font-size: 13px;
  box-sizing: border-box;
}

.input-with-action {
  display: flex;
  gap: 8px;
}

.small-action-btn {
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.small-action-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.modal-actions-row {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-primary {
  padding: 10px 20px;
  background: #25e076;
  color: #0c1626;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.rules-section {
  margin-bottom: 16px;
}

.rules-section h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: #00ffee;
  font-weight: 700;
}

.rules-section p {
  margin: 0;
  font-size: 12.5px;
  color: #9ba3b8;
  line-height: 1.5;
}

.rules-list {
  margin: 6px 0 0;
  padding-left: 18px;
  color: #9ba3b8;
  font-size: 12.5px;
  line-height: 1.6;
}

.rules-list strong {
  color: #ffffff;
}

.history-table-wrap {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.history-table th {
  text-align: left;
  padding: 8px 10px;
  color: #7b849b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  text-transform: uppercase;
}

.history-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.empty-history td {
  text-align: center;
  color: #6e778d;
  padding: 24px 10px;
}

.how-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 13px;
  color: #9ba3b8;
  line-height: 1.5;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #25e076;
  color: #0c1626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.avatar-pick {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #252a3a;
  border: 2px solid transparent;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 150ms ease, transform 150ms ease;
}

.avatar-pick:hover {
  transform: scale(1.08);
}

.avatar-pick.active {
  border-color: #00ffee;
  background: #2e354a;
}

/* Responsive — mobile panel matches the original compact layout */
@media (max-width: 820px) {
  .brand { width: 136px; }
  .control-bar {
    width: min(350px, calc(100vw - 16px));
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  .control-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 38px 68px;
    gap: 0px 8px;
    height: auto;
    position: relative;
    min-height: 0;
    padding: 0;
    background: url(../assets/ui/bar_bg_mobile.png) center / 100% 100% no-repeat;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
    border: none;
  }
  .panel-cell {
    border-radius: 8px;
    position: relative;
    margin: 0;
    box-sizing: border-box;
  }

  /* TOP ROW: Back edge perfectly matches the back edge of bet & difficulty, nose stays in place */
  .balance-cell {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    width: 158px;
    height: 38px;
    margin: 0;
    background-image: url(../assets/ui/balanceMob.png);
    flex-direction: column;
    justify-content: center;
    padding: 2px 12px;
    gap: 1px;
    z-index: 1;
  }
  .balance-cell .cell-label { font-size: 7.5px; font-weight: 500; letter-spacing: 0.08em; opacity: 0.82; }
  .balance-cell .cell-value { font-size: 11.5px; font-weight: 500; gap: 3.5px; }
  .balance-cell .coin-icon { width: 11px; height: 11px; font-size: 7px; }

  .cashout-cell {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    width: 158px;
    height: 38px;
    margin: 0;
    background-color: transparent !important;
    background-image: url(../assets/ui/cashoutMobileDisable.png);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2px 12px;
    gap: 1px;
    z-index: 1;
  }
  .cashout-cell:not(:disabled) {
    background-color: transparent !important;
    background-image: url(../assets/ui/cashoutMobile.png);
  }
  .cashout-cell .cell-label { font-size: 7.5px; font-weight: 500; letter-spacing: 0.08em; opacity: 0.82; }
  .cashout-cell .cell-value { font-size: 11.5px; font-weight: 500; }

  /* BOTTOM ROW: Exact 2:1 ratio (136px x 68px), calibrated so play button nests without covering arrows */
  .bet-cell {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    width: 136px;
    height: 68px;
    aspect-ratio: 2 / 1;
    margin: 0;
    margin-top: -1px;
    margin-right: 22px;
    background-image: url(../assets/ui/betMob.png);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 10px;
    z-index: 2;
  }

  .difficulty-cell {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    width: 136px;
    height: 68px;
    aspect-ratio: 2 / 1;
    margin: 0;
    margin-top: -1px;
    margin-left: 22px;
    background-image: url(../assets/ui/diffucultyMob.png);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 0 8px;
    z-index: 2;
  }

  /* Centered play button scaled to nest into card curve without covering card contents */
  .go-button {
    position: absolute;
    left: 50%;
    bottom: 0px;
    transform: translateX(-50%) !important;
    width: 66px;
    height: 66px;
    margin: 0;
    border-radius: 50%;
    z-index: 5;
    align-self: auto;
    justify-self: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .go-button:hover,
  .go-button:active,
  .go-button:focus {
    transform: translateX(-50%) !important;
  }

  .go-orb { width: 66px; height: 66px; }
  .go-icon { width: 28px; }
  #goText { font-size: 17px; font-weight: 800; }

  .bet-cell .cell-label { font-size: 7.5px; font-weight: 500; letter-spacing: 0.08em; opacity: 0.82; }
  .difficulty-cell .cell-label { font-size: 7.5px; font-weight: 500; letter-spacing: 0.08em; opacity: 0.82; }

  .bet-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5px;
    padding: 0;
    flex: 1;
    min-width: 0;
  }
  #betInput { width: 32px; font-size: 12px; font-weight: 500; }
  .bet-cell .coin-icon { width: 11px; height: 11px; font-size: 7px; }
  .bet-steppers {
    width: 24px;
    height: 42px;
    gap: 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 25 !important;
    position: relative;
    flex-shrink: 0;
    margin: 0 4px 0 0;
  }

  .difficulty-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 1.5px;
    padding: 0;
    flex: 1;
    min-width: 0;
  }
  #difficultyValue { font-size: 11px; font-weight: 500; letter-spacing: 0.02em; }
  .difficulty-steppers {
    width: 24px;
    height: 42px;
    gap: 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 25 !important;
    position: relative;
    flex-shrink: 0;
    margin: 0 0 0 10px;
  }
  .step-button {
    width: 24px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .step-icon { width: 11px; height: 7px; pointer-events: none; }

  .last-win-bar {
    display: block;
    margin-top: 8px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  }

  .preset-menu { left: 4px; right: auto; bottom: calc(100% + 8px); grid-template-columns: repeat(3, 1fr); width: 260px; }
  .difficulty-menu { right: 4px; left: auto; bottom: calc(100% + 8px); width: 220px; }
  .space-hint { display: none; }
}

@media (max-width: 480px) {
  .game-header { top: 10px; left: 10px; right: 10px; }
  .brand { width: 104px; }
  .risk-free-badge { font-size: 8.5px; padding: 2px 6px; }
  .risk-free-badge .badge-icon { font-size: 10px; }
  .no-risk-btn {
    height: 40px;
    padding: 0 8px 0 10px;
    gap: 6px;
  }
  .no-risk-icon { font-size: 15px; }
  .no-risk-title { font-size: 9.5px; }
  .no-risk-sub { font-size: 8px; }
  .no-risk-switch { width: 28px; height: 16px; }
  .no-risk-knob { width: 12px; height: 12px; }
  .no-risk-btn.active .no-risk-knob { transform: translateX(12px); }
  .icon-button { width: 40px; height: 40px; }
  .control-bar { width: min(336px, calc(100vw - 12px)); bottom: max(8px, env(safe-area-inset-bottom)); }
  .control-panel { grid-template-rows: 36px 64px; gap: 0px 6px; }
  .balance-cell { justify-self: end; width: 148px; height: 36px; padding: 2px 10px; }
  .cashout-cell { justify-self: start; width: 148px; height: 36px; padding: 2px 10px; }
  .bet-cell { width: 128px; height: 64px; aspect-ratio: 2 / 1; justify-self: end; margin-top: -1px; margin-right: 20px; padding: 0 6px 0 8px; }
  .difficulty-cell { width: 128px; height: 64px; aspect-ratio: 2 / 1; justify-self: start; margin-top: -1px; margin-left: 20px; padding: 0 8px 0 6px; }
  .go-button { width: 62px; height: 62px; bottom: 0px; }
  .go-button:hover,
  .go-button:active,
  .go-button:focus {
    transform: translateX(-50%) !important;
  }
  .go-orb { width: 62px; height: 62px; }
  .go-icon { width: 26px; }
  #goText { font-size: 15px; font-weight: 800; }
  .balance-cell .cell-label, .cashout-cell .cell-label { font-size: 7px; font-weight: 500; }
  .balance-cell .cell-value, .cashout-cell .cell-value { font-size: 10.5px; font-weight: 500; }
  .balance-cell .coin-icon { width: 10px; height: 10px; font-size: 6.5px; }
  .bet-cell .cell-label, .difficulty-cell .cell-label { font-size: 7px; font-weight: 500; }
  #betInput { width: 28px; font-size: 11px; font-weight: 500; }
  .bet-cell .coin-icon { width: 10px; height: 10px; font-size: 6.5px; }
  #difficultyValue { font-size: 10px; font-weight: 500; }
  .bet-steppers { width: 22px; height: 38px; margin-right: 4px; }
  .difficulty-steppers { width: 22px; height: 38px; margin-left: 8px; }
  .step-button { width: 22px; height: 18px; }
  .step-icon { width: 10px; height: 6px; }
  .win-banner { top: 12%; width: min(290px, 86vw); }
  .desktop-only,
  #spaceHint,
  #spaceToggleRow {
    display: none !important;
  }
  .menu-panel {
    top: calc(max(10px, env(safe-area-inset-top)) + 52px);
    right: max(10px, env(safe-area-inset-right));
    width: min(280px, calc(100vw - 20px));
    padding: 12px 14px 10px;
    border-radius: 14px;
  }
  .menu-header {
    padding-bottom: 10px;
    margin-bottom: 4px;
  }
  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }
  .user-name {
    font-size: 12px;
    max-width: 120px;
  }
  .change-avatar-btn {
    font-size: 10px;
  }
  .menu-close-btn {
    width: 28px;
    height: 28px;
  }
  .menu-item-btn {
    padding: 7px 4px;
    font-size: 12px;
    border-radius: 6px;
  }
  .menu-item-left {
    gap: 9px;
  }
  .menu-item-icon {
    width: 16px;
    height: 16px;
  }
  .menu-toggle-row {
    padding: 6px 4px;
    font-size: 12px;
  }
  .switch-control {
    width: 38px;
    height: 20px;
  }
  .switch-slider::before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
  }
  .switch-control input:checked + .switch-slider::before {
    transform: translateX(18px);
  }
  .menu-divider {
    margin: 4px 0;
  }
}









