* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  /* font-family: Inter, Arial, sans-serif; */
  font-family: "Inter", sans-serif;
  font-family: "Open Sans", sans-serif;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* iOS Safari's address/tab bars grow and shrink the visible area without resizing the
   classic 100vh unit (100vh has always meant "as if the browser chrome were fully
   retracted"), so a box sized from plain 100vh can end up taller than what's actually on
   screen whenever the bars are showing — the top/bottom of .machine gets tucked behind
   them. 100svh ("small viewport height") is the opposite: the height guaranteed visible
   with the browser chrome at its MOST expanded, so a box sized from it can never be cropped
   in any chrome state. We deliberately did not pick 100dvh (which live-tracks the chrome and
   would resize/jump the whole board as Safari's bars show/hide) or 100lvh (sized for chrome
   fully hidden — the same cropping bug as plain vh when the chrome is visible). --safe-vw/
   --safe-vh also net out the hardware safe-area (notch / home-indicator strip), which vh
   units never account for regardless of flavor, so the board and its bottom-edge controls
   (e.g. HOLD) never sit under the home-indicator gesture area. Old browsers without svh/
   env() support simply never match the @supports block below and keep the plain vh/vw
   custom properties as-is — no separate fallback branch needed. */
:root {
  --safe-vw: 100vw;
  --safe-vh: 100vh;
}
@supports (height: 100svh) {
  :root {
    --safe-vh: 100svh;
  }
}
@supports (width: 100svw) {
  :root {
    --safe-vw: 100svw;
  }
}
.stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  width: var(--safe-vw);
  height: var(--safe-vh);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.machine {
  position: relative;
  /* Plain-vh fallback first (kept exactly as before) for any browser that doesn't
     understand env()/custom properties in calc() — an unsupported value invalidates only
     this later declaration, so the browser keeps the one above it. */
  width: min(100vw, calc(100vh * 711 / 1536));
  height: min(100vh, calc(100vw * 1536 / 711));
  width: min(
    calc(var(--safe-vw) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)),
    calc((var(--safe-vh) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 711 / 1536)
  );
  height: min(
    calc(var(--safe-vh) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)),
    calc((var(--safe-vw) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) * 1536 / 711)
  );
  aspect-ratio: 711/1536;
  overflow: hidden;
  touch-action: none;
  /* --hud: #83e92e; */
  --hud: #fcc348;
  --rim: #d4a744;
  --shadowball: #543d0d;
}

/* v15.4 iOS interaction guard: long-press gameplay controls must never invoke Live Text/text-selection UI. */
.machine,
.machine .skin,
.machine .game-canvas,
.machine .hud,
.machine .fx,
.machine .hotspots,
.machine .hotspot {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}
.machine img {
  -webkit-user-drag: none !important;
  user-drag: none !important;
}
html.theme-blue .machine {
  --hud: #18c6ff;
  --rim: #2787ff;
  --shadowball: #0d2d54;
}
html.theme-red .machine {
  --hud: #ff3a32;
  --rim: #e4433c;
  --shadowball: #540f0d;
}
html.theme-green .machine {
  --hud: #8cec35;
  --rim: #69c83c;
  --shadowball: #28520d;
}

html.theme-blue {
  --rim: #2787ff;
}
html.theme-red {
  --rim: #e4433c;
}
html.theme-green {
  --rim: #69c83c;
}
html.theme-gold {
  --rim: #d4a744;
}


html {
    --sb-track-color: #050505;
    --sb-thumb-color: var(--rim);
    --sb-size: 12px;
}

/* Firefox */
@-moz-document url-prefix() {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);
  }
}

*::-webkit-scrollbar {
    width: var(--sb-size)
}

*::-webkit-scrollbar-track {
    background: var(--sb-track-color);
    border-radius: 11px;
    margin-top: 12px;
    margin-bottom: 12px;

}

*::-webkit-scrollbar-thumb {
    background: var(--sb-thumb-color);
    border-radius: 4px;
    border-radius: 11px;
    border: 4px solid var(--sb-track-color);
}

@supports not selector(::-webkit-scrollbar) {
    body {
        scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);
    }
}
/* ================================= */

.skin,
.game-canvas,
.hud,
.fx,
.hotspots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.skin {
  z-index: 1;
  display: block;
}
.game-canvas {
  z-index: 3;
  pointer-events: none;
}
.fx {
  z-index: 4;
  pointer-events: none;
}
.hud {
  z-index: 5;
  pointer-events: none;
}
.hotspots {
  z-index: 6;
  pointer-events: none;
}
.hotspot {
  position: absolute;
  border: 0;
  background: transparent;
  pointer-events: auto;
  touch-action: none;
}

/* Clean dynamic top values — opaque backing prevents any old glyph ghosting */
.live {
  position: absolute;
  color: var(--hud);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 0 0.3em currentColor;
}
#jackpotValue {
  left: 4%;
  top: 12.2%;
  width: 31.8%;
  font-size: clamp(18px, 4.55vw, 5.8cqw);
  background: #030604;
  padding: 0.16em 0.26em;
  border-radius: 4px;
}
#creditsValue {
  left: 64%;
  top: 12.2%;
  width: 32%;
  font-size: clamp(18px, 4.55vw, 5.8cqw);
  background: #030604;
  padding: 0.16em 0.26em;
  border-radius: 4px;
}

/* Final clean middle band: one surface, no previous values underneath */
#midClean {
  position: absolute;
  left: 3.3%;
  top: 18.6%;
  width: 93.4%;
  height: 7.2%;
  display: grid;
  grid-template-columns: 33.33% 22.22% 22.22% 22.22%;
  background: linear-gradient(180deg, #050807 0%, #020403 58%, #050706 100%);
  border-radius: 4px;
  overflow: hidden;
}
.midCell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 0 8%;
}
/* .midCell:not(:last-child)::after { */
.midCell:not(:first-child):not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 9%;
  height: 82%;
  width: 1px;
  background: color-mix(in srgb, var(--rim) 72%, transparent);
}
.midCell .label {
  color: #f5f2e9;
  font-size: clamp(6.5px, 1.38vw, 10.5px);
  font-weight: 800;
  white-space: nowrap;
}
.midCell .amount {
  color: var(--hud);
  font-size: clamp(15px, 3.6vw, 5.2cqw);
  font-weight: 950;
  text-shadow: 0 0 0.26em currentColor;
  /* margin-top: 0.3em; */
  letter-spacing: -0.015em;
}
.midCell.round {
  align-items: flex-start;
}
.midCell.pay {
  align-items: center;
}
#roundSub {
  color: #f4f1e8;
  font-size: clamp(4.5px, 0.78vw, 6.4px);
  font-weight: 700;
  white-space: nowrap;
  margin-top: 0.45em;
}

/* Final bottom panels. Old text/buttons/balls are fully covered by one clean interior. */
.bottomPanel {
  position: absolute;
  top: 80%;
  height: 8.55%;
  background: linear-gradient(180deg, #050807, #020302 62%, #060806);
  display: flex;
  flex-direction: column;
  align-items: center;
}
#betPanel {
  left: 3.5%;
  width: 29%;
}
#ballsPanel {
  left: 67%;
  width: 29%;
}
.bottomLabel {
  color: #f5f2e9;
  font-size: clamp(7px, 1.45vw, 11px);
  font-weight: 800;
  letter-spacing: 0.025em;
  margin-top: 8%;
  visibility: visible;
}
.bottomValue {
  color: var(--hud);
  font-size: clamp(16px, 4.1vw, 6cqw);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 0.3em currentColor;
  margin-top: 7%;
}
.betButtons {
  display: flex;
  gap: 8%;
  width: 82%;
  height: 28%;
  margin-top: 8%;
}
.betButton {
  flex: 1;
  display: flex;
  justify-content: center;
  place-items: center;
  background: linear-gradient(180deg, #101412, #050706);
  border: 1.5px solid color-mix(in srgb, var(--rim) 78%, #433318);
  border-radius: 5px;
  color: #f4eee0;
  font-weight: 700;
  font-size: clamp(18px, 4.2vw, 26px);
  line-height: 1;
  box-shadow:
    inset 0 0 8px #000,
    0 0 5px color-mix(in srgb, var(--rim) 18%, transparent);
}
#ballDots {
  width: 82%;
  height: 24%;
  margin-top: 8%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#ballDots i {
  display: block;
  width: 17%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff 0%, #efffca 13%, var(--hud) 40%, var(--shadowball) 70%, #020602 100%);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 0 7px var(--hud),
    inset 0 0 4px rgba(255, 255, 255, 0.55);
}
#ballDots i.extra {
  background: radial-gradient(circle at 30% 25%, #fff, #55efff 40%, #08798d 72%, #021216);
  box-shadow: 0 0 8px #43ecff;
}

/* HOLD light progression */
.fxshape {
  position: absolute;
  opacity: 0;
}
#holdFx {
  left: 35%;
  top: 80%;
  width: 29%;
  aspect-ratio: 1;
  border-radius: 50%;
  --p: 0;
}
#holdFx::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from -90deg, var(--hud) calc(var(--p) * 1turn), transparent 0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  filter: drop-shadow(0 0 10px var(--hud));
}
#holdFx.active {
  opacity: 1;
}
#roundFx {
  left: 2.2%;
  top: 18.45%;
  width: 32%;
  height: 7.6%;
  border-radius: 11px;
}
#jackpotFx {
  left: 2.2%;
  top: 8.7%;
  width: 35.7%;
  height: 8.5%;
  border-radius: 12px;
}
.rectfx::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 3px;
  background: conic-gradient(from var(--a, 0deg), transparent 0 13%, var(--hud) 20% 34%, transparent 42% 65%, color-mix(in srgb, var(--hud) 72%, white) 73% 82%, transparent 90%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  filter: drop-shadow(0 0 8px var(--hud));
}
.rectfx.active {
  opacity: 0.95;
  animation: chase 1.15s linear infinite;
}
@keyframes chase {
  to {
    --a: 360deg;
  }
}

/* v11.13.1 micro-feedback */
#holdFx.ready {
  opacity: 0.28;
  animation: ballisticReadyBreath 1.35s ease-in-out infinite alternate;
}
#holdFx.ready::before {
  background: conic-gradient(from -90deg, var(--hud) 1turn, transparent 0);
  filter: drop-shadow(0 0 7px var(--hud));
}
@keyframes ballisticReadyBreath {
  from {
    opacity: 0.13;
    transform: scale(0.985);
  }
  to {
    opacity: 0.34;
    transform: scale(1.015);
  }
}
#liveBonusValue.gf-pot-pop {
  animation: ballisticPotPop 0.34s cubic-bezier(0.16, 0.88, 0.25, 1.18);
}
@keyframes ballisticPotPop {
  0% {
    transform: scale(0.9);
    filter: brightness(0.8);
  }
  55% {
    transform: scale(1.1);
    filter: brightness(1.42);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

/* ===== v11.13 GAME-FEEL LAYER =====
   Visual-only dynamism. No physics/scoring/audio mapping changes. */
.hud-rim-fx {
  display: block !important;
}

#offerPanel.show .panel {
  animation: ballisticOfferEnter 0.46s cubic-bezier(0.18, 0.88, 0.26, 1.18) both;
}
/* #offerPanel.show .panel::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0.68;
  box-shadow:
    0 0 18px var(--hud),
    0 0 42px color-mix(in srgb, var(--hud) 36%, transparent);
  animation: ballisticOfferAura 1.05s ease-out both;
} */
@keyframes ballisticOfferEnter {
  0% {
    transform: scale(0.9);
    filter: brightness(0.72);
    opacity: 0;
  }
  58% {
    transform: scale(1.025);
    filter: brightness(1.18);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
    opacity: 1;
  }
}
@keyframes ballisticOfferAura {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  38% {
    opacity: 0.78;
  }
  100% {
    opacity: 0.18;
    transform: scale(1.035);
  }
}

#resultPanel.show .panel {
  animation: ballisticResultEnter 0.4s cubic-bezier(0.2, 0.85, 0.25, 1.12) both;
}
#resultPanel.show .round-summary > div {
  opacity: 0;
  transform: translateY(8px);
  animation: ballisticSummaryRow 0.3s ease-out forwards;
}
#resultPanel.show .round-summary > div:nth-child(1) {
  animation-delay: 0.08s;
}
#resultPanel.show .round-summary > div:nth-child(2) {
  animation-delay: 0.14s;
}
#resultPanel.show .round-summary > div:nth-child(3) {
  animation-delay: 0.2s;
}
#resultPanel.show .round-summary > div:nth-child(4) {
  animation-delay: 0.3s;
}
#resultPanel.show .round-summary > div:nth-child(5) {
  animation-delay: 0.42s;
}
#resultPanel.show .round-summary > div:nth-child(6) {
  animation-delay: 0.5s;
}
#resultPanel.show #resultAmount {
  animation: ballisticFinalAmount 0.58s 0.5s ease-out both;
}
@keyframes ballisticResultEnter {
  0% {
    transform: scale(0.94);
    opacity: 0;
    filter: brightness(0.75);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
}
@keyframes ballisticSummaryRow {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes ballisticFinalAmount {
  0% {
    opacity: 0.15;
    transform: scale(0.88);
    filter: brightness(0.75);
  }
  62% {
    opacity: 1;
    transform: scale(1.045);
    filter: brightness(1.35);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
}

.machine.gf-level-3 {
  filter: brightness(1.015);
}
.machine.gf-level-4 {
  filter: brightness(1.028);
}
.machine.gf-level-5 {
  filter: brightness(1.045);
}

/* Hotspots */
#menuHot {
  left: 2%;
  top: 1%;
  width: 11%;
  height: 6%;
}
#cardsTopHot {
  left: 13.5%;
  top: 1%;
  width: 11%;
  height: 6%;
}
#paytableHot {
  left: 74%;
  top: 1%;
  width: 9%;
  height: 6%;
}
#infoHot {
  left: 83%;
  top: 1%;
  width: 7%;
  height: 6%;
}
#soundHot {
  left: 90%;
  top: 1%;
  width: 8%;
  height: 6%;
}
#minusHot {
  left: 6.5%;
  top: 88%;
  width: 11%;
  height: 2.8%;
}
#plusHot {
  left: 20.5%;
  top: 88%;
  width: 11%;
  height: 2.8%;
}
#pushHot {
  left: 33.8%;
  top: 79.1%;
  width: 32.8%;
  height: 12.8%;
  border-radius: 50%;
  z-index: 60;
}
#newHot {
  left: 2%;
  top: 92.4%;
  width: 35%;
  height: 5%;
}
#resetHot {
  left: 62.5%;
  top: 92.4%;
  width: 35%;
  height: 5%;
}

.compat {
  display: none !important;
}
#soundGate {
  display: none !important;
}
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000c;
  pointer-events: auto;
}
.overlay.show {
  display: flex;
}
.panel {
  width: 82%;
  max-height: 78%;
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--hud);
  border-radius: 16px;
  background: #06100b;
  color: #fff;
}

/* ===== THEME-AWARE MODALS / EXTRA-BALL / INFO / PAYTABLE ===== */
.overlay {
  background: rgba(0, 0, 0, 0.78) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.overlay .panel {
  position: relative;
  width: 82% !important;
  max-height: 78% !important;
  overflow-y: auto !important;
  overflow-x: clip;
  padding: 22px 20px 20px !important;
  border: 2px solid var(--rim) !important;
  border-radius: 18px !important;
  background: radial-gradient(circle at 50% -15%, color-mix(in srgb, var(--hud) 16%, transparent), transparent 52%), linear-gradient(180deg, #101010 0%, #050505 54%, #090909 100%) !important;
  color: #fff !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 18px color-mix(in srgb, var(--rim) 48%, transparent),
    0 0 34px color-mix(in srgb, var(--hud) 18%, transparent) !important;
}
/* .overlay .panel::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--hud), transparent);
  box-shadow: 0 0 12px var(--hud);
} */
.overlay .panel h2 {
  margin: 0.2em 0 0.75em !important;
  text-align: center !important;
  color: var(--hud) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  text-shadow: 0 0 12px currentColor !important;
}
.overlay .panel p, .payrows div {
  line-height: 1.4;
  margin-top: 0px;
  margin-bottom: 8px;
}

.overlay .panel button {
  min-height: auto !important;
  margin: 7px 0px 14px 0px;
  padding: 10px 14px;
  border: 1.5px solid var(--rim);
  border-radius: 8px;
  background: linear-gradient(180deg, #151515, #060606);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.025em;
  box-shadow:
    inset 0 0 8px #000,
    0 0 7px color-mix(in srgb, var(--rim) 30%, transparent);
}
.overlay .panel button:active {
  color: var(--hud);
  border-color: var(--hud);
  box-shadow:
    0 0 12px var(--hud),
    inset 0 0 8px #000;
}

/* Near-line and secured-line hints in the top payout band */
.midCell.pay.line-near .label,
.midCell.pay.line-hit .label,
.midCell.pay.line-hit .amount {
  animation: ballisticLinePulse 0.62s ease-in-out infinite alternate;
}
.midCell.pay.line-near .label {
  color: var(--hud) !important;
}
.midCell.pay.line-hit .label,
.midCell.pay.line-hit .amount {
  filter: brightness(1.35);
}
@keyframes ballisticLinePulse {
  from {
    opacity: 0.68;
    text-shadow: 0 0 2px currentColor;
  }
  to {
    opacity: 1;
    text-shadow:
      0 0 9px currentColor,
      0 0 18px currentColor;
  }
}

/* ===== V8.5 STABILIZED MODAL HIERARCHY ===== */
#offerPanel .panel {
  max-width: 520px;
  text-align: center;
}
#offerPrice {
  color: var(--hud) !important;
  font-size: clamp(22px, 5vw, 36px) !important;
  font-weight: 950 !important;
  margin: 0.55em 0 0.25em !important;
  text-shadow: 0 0 12px currentColor;
}
#offerCountdown {
  color: #c9c9c9 !important;
  font-size: clamp(10px, 2.1vw, 14px) !important;
  letter-spacing: 0.08em;
}
#offerMessage {
  margin: 0.4em auto 0.6em !important;
  max-width: 34em;
  color: #f2f2f2 !important;
}
#offerAccept,
#offerDecline {
  min-width: 42%;
}

/* ===== V8.6 ROUND RESULT ===== */
#resultPanel .panel {
  text-align: center;
  max-width: 520px;
}
#resultTitle {
  color: var(--hud) !important;
  text-shadow: 0 0 14px currentColor;
}
#resultAmount {
  color: var(--hud);
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 950;
  margin: 0.35em 0 0.55em;
  text-shadow: 0 0 16px currentColor;
}
#resultContinue {
  min-width: 55%;
}

/* ===== V8.9 WALLET TOP-UP ===== */
#topUpLabel {
  position: absolute;
  left: 63.6%;
  top: 94%;
  width: 32.7%;
  height: 2.45%;
  z-index: 9;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 7, 0.97), rgba(1, 2, 2, 0.99));
  color: var(--hud);
  font-size: clamp(8px, 1.7vw, 13px);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-shadow: 0 0 7px currentColor;
  border-radius: 4px;
}

#topUpLabelLeft {
  left: 4%;
  top: 94%;
  width: 31.7%;
  height: 2.45%;
  display: grid;
  place-items: center;
  font-size: clamp(8px, 1.7vw, 13px);
  font-weight: 900;
  letter-spacing: 0.05em;
  position: absolute;
  z-index: 9;
  pointer-events: none;
  color: var(--hud);
  text-shadow: 0 0 7px currentColor;
  border-radius: 4px;
}

#ballDots i.spent {
  visibility: hidden !important;
  opacity: 0 !important;
  box-shadow: none !important;
}

/* ===== V8.9.5 ROUND SUMMARY ===== */
.round-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 14px 0 10px;
  text-align: left;
}
.round-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--rim) 45%, transparent);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}
.round-summary span {
  color: #bfc3c4;
  font-size: clamp(9px, 1.8vw, 12px);
  letter-spacing: 0.05em;
}
.round-summary strong {
  color: var(--hud);
  font-size: clamp(11px, 2.2vw, 15px);
  text-align: right;
}
#resultAmount small {
  color: #bfc3c4;
  font-size: 0.38em;
  letter-spacing: 0.08em;
}

/* ===== V8.9.5 TOP-UP SELECTOR ===== */
#topUpPanel .panel {
  max-width: 500px;
  text-align: center;
}
.topup-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0 12px;
}
.topup-options button {
  min-height: 48px !important;
  font-size: clamp(16px, 3.5vw, 24px) !important;
  color: var(--hud) !important;
}
.topup-options button:last-child {
  grid-column: 1/-1;
}

/* ===== V8.9.8 HOLD: SINGLE RING ONLY ===== */
#powerGauge {
  display: none !important;
}

/* ===== V8.9.8 CONTEXTUAL THEMED RIMS ===== */
.hud-rim-fx {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  border: 2px solid rgba(var(--hud-rgb, 84, 200, 255), 0);
  border-radius: 10px;
  box-shadow:
    0 0 0 rgba(var(--hud-rgb, 84, 200, 255), 0),
    inset 0 0 0 rgba(var(--hud-rgb, 84, 200, 255), 0);
  opacity: 0;
  transition:
    opacity 0.18s linear,
    border-color 0.18s linear,
    box-shadow 0.18s linear;
  overflow: hidden;
}
.hud-rim-fx::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from var(--rim-angle, 0deg), transparent 0deg, rgba(var(--hud-rgb, 84, 200, 255), 0) 30deg, rgba(var(--hud-rgb, 84, 200, 255), 0.95) 58deg, rgba(var(--hud-rgb, 84, 200, 255), 0.15) 84deg, transparent 118deg 360deg);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 2px;
  opacity: var(--rim-power, 0);
}
.hud-rim-fx.active {
  opacity: 1;
  border-color: rgba(var(--hud-rgb, 84, 200, 255), calc(0.15 + var(--rim-power, 0) * 0.55));
  box-shadow:
    0 0 calc(4px + var(--rim-power, 0) * 16px) rgba(var(--hud-rgb, 84, 200, 255), calc(0.12 + var(--rim-power, 0) * 0.55)),
    inset 0 0 calc(2px + var(--rim-power, 0) * 10px) rgba(var(--hud-rgb, 84, 200, 255), calc(0.05 + var(--rim-power, 0) * 0.25));
}
.hud-rim-fx.hot {
  animation: rimPulse 0.72s ease-in-out infinite alternate;
}
@keyframes rimPulse {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.45);
  }
}

/* Positions matching current UI boxes */
#jackpotRimFx {
  left: 2.6%;
  top: 8.9%;
  width: 36.5%;
  height: 8%;
}
#creditsRimFx {
  left: 60.8%;
  top: 8.9%;
  width: 36.5%;
  height: 8%;
}
#roundPotRimFx {
  left: 2.6%;
  top: 17.8%;
  width: 31.5%;
  height: 7.1%;
}
#line3RimFx {
  left: 34.2%;
  top: 17.8%;
  width: 21.7%;
  height: 7.1%;
}
#line4RimFx {
  left: 55.9%;
  top: 17.8%;
  width: 20.3%;
  height: 7.1%;
}
#line5RimFx {
  left: 76.2%;
  top: 17.8%;
  width: 21.1%;
  height: 7.1%;
}
#unitBetRimFx {
  left: 2.7%;
  top: 79%;
  width: 31.3%;
  height: 9.7%;
}
#ballsRimFx {
  left: 65.8%;
  top: 79%;
  width: 31.4%;
  height: 9.7%;
}

/* ===== V9.0 CLEAN HUD =====
   Product UI must never invent highlighted payout frames. Only the live values,
   the HOLD ring, actual numbered holes, and genuine line celebrations animate. */
.hud-rim-fx {
  display: none !important;
}
#roundFx,
#jackpotFx {
  display: none !important;
}

/* ===== PRODUCTION CONNECTED AUTH OVERLAY ===== */
#netAuthOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at 50% 18%, rgba(11, 43, 29, 0.985), rgba(1, 10, 6, 0.995) 76%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
}
#netAuthOverlay.show {
  display: flex;
}
#netAuthCard {
  width: min(390px, 92vw);
  background: linear-gradient(180deg, #073d25, #021d11);
  border: 1.5px solid #8a6a20;
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.72),
    inset 0 0 0 1px rgba(255, 226, 138, 0.08);
}
#netAuthCard .brand {
  text-align: center;
  margin-bottom: 18px;
}
.net-brand-title {
  font-size: 28px;
  font-weight: 1000;
  color: #b9ff64;
  letter-spacing: 0.055em;
  text-shadow: 0 0 18px rgba(126, 255, 51, 0.28);
}
.net-brand-sub {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: #d8aa3b;
  margin-top: 4px;
}
.net-brand-note {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(216, 170, 59, 0.62);
  margin-top: 5px;
}
#netAuthTabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.net-tab {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid #70500e;
  background: transparent;
  color: #d8aa3b;
  font-weight: 900;
  cursor: pointer;
}
.net-tab.active {
  background: #0a4b2a;
  color: #ffe08a;
}
#netAuthOverlay form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#netRegisterForm {
  display: none;
}
#netAuthOverlay input,
#netAuthOverlay select {
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid #70500e;
  background: #01180d;
  color: #fff7c8;
  outline: none;
}
#netAuthOverlay input:focus,
#netAuthOverlay select:focus {
  border-color: #d8aa3b;
  box-shadow: 0 0 0 2px rgba(216, 170, 59, 0.13);
}
.net-auth-submit {
  margin-top: 5px;
  padding: 12px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(180deg, #c7ff78, #7fd93b 48%, #3f8d1e);
  color: #0a1d0d;
  font-weight: 1000;
  letter-spacing: 0.04em;
  cursor: pointer;
}
#netAuthError {
  margin-top: 12px;
  min-height: 18px;
  color: #ff8a73;
  font-size: 13px;
  text-align: center;
}
#netAuthStatus {
  margin-top: 4px;
  min-height: 17px;
  color: #d8aa3b;
  font-size: 12px;
  text-align: center;
}
.net-auth-note {
  margin: 15px 0 0;
  font-size: 10px;
  color: #a7aa83;
  text-align: center;
  line-height: 1.45;
}

/* ===== v11.14.1 VISIBLE EVENT FX =====
   This deliberately overrides the old V9.0 "display:none!important" residue.
   Rims are still event-driven by updateHudRims(); they are NOT permanently lit. */
.hud-rim-fx {
  display: block !important;
}

/* Keep the effect premium and readable on a phone-sized screen. */
.hud-rim-fx.active {
  border-width: 1.5px;
  filter: brightness(1.14);
}

/* ===== v11.15 NEON VISIBILITY ===== */
.hud-rim-fx.active {
  border-color: rgba(var(--hud-rgb, 84, 200, 255), calc(0.3 + var(--rim-power, 0) * 0.68)) !important;
  box-shadow:
    0 0 calc(8px + var(--rim-power, 0) * 24px) rgba(var(--hud-rgb, 84, 200, 255), calc(0.2 + var(--rim-power, 0) * 0.68)),
    inset 0 0 calc(4px + var(--rim-power, 0) * 14px) rgba(var(--hud-rgb, 84, 200, 255), calc(0.08 + var(--rim-power, 0) * 0.34)) !important;
}
.hud-rim-fx::before {
  opacity: calc(var(--rim-power, 0) * 0.95) !important;
}

/* ===== v11.17 PREMIUM RENDER POLISH ===== */
#game {
  image-rendering: auto;
  -webkit-font-smoothing: antialiased;
}
.machine,
.machine button,
.machine .value,
.machine .label {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

/* ===== v14.2 PRECISION HUD / PHYSICAL-LAMP POLISH =====
   The original cabinet art already contains the frames. Event light now follows
   those chamfered paths instead of drawing rounded CSS rectangles on top. */
.hud-rim-fx {
  display: none !important;
}
#precisionHudFx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 7;
  pointer-events: none;
  overflow: visible;
}
.precision-rim {
  fill: none;
  stroke: var(--hud);
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition:
    opacity 0.12s linear,
    filter 0.12s linear;
}
.precision-rim.active {
  opacity: var(--precision-power, 0.72);
  filter: drop-shadow(0 0 3px var(--hud)) drop-shadow(0 0 7px color-mix(in srgb, var(--hud) 58%, transparent));
}
.precision-rim.hot {
  animation: precisionRimPulse 0.58s ease-in-out infinite alternate;
}
@keyframes precisionRimPulse {
  from {
    opacity: 0.48;
    stroke-width: 1.85;
  }
  to {
    opacity: var(--precision-power, 1);
    stroke-width: 2.35;
  }
}

/* ===== v16.8 JACKPOT HEAT ===== */
#jackpotValue.jackpot-heat-1,
#jackpotValue.jackpot-heat-2,
#jackpotValue.jackpot-heat-3 {
  transform-origin: center;
}
#jackpotValue.jackpot-heat-1 {
  animation: jackpotHeat1 2.4s ease-in-out infinite alternate;
}
#jackpotValue.jackpot-heat-2 {
  animation: jackpotHeat2 1.7s ease-in-out infinite alternate;
}
#jackpotValue.jackpot-heat-3 {
  animation: jackpotHeat3 1.1s ease-in-out infinite alternate;
}
@keyframes jackpotHeat1 {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.12) drop-shadow(0 0 8px currentColor);
  }
}
@keyframes jackpotHeat2 {
  from {
    filter: brightness(1.02);
  }
  to {
    filter: brightness(1.22) drop-shadow(0 0 14px currentColor);
  }
}
@keyframes jackpotHeat3 {
  from {
    filter: brightness(1.06);
  }
  to {
    filter: brightness(1.38) drop-shadow(0 0 22px currentColor);
    transform: scale(1.018);
  }
}

/* =============== PRISS ================ */
button, #topUpLabelLeft, #topUpLabel {
  cursor: pointer;
}

#jackpotValue,
#creditsValue,
#midClean,
#betPanel,
#ballsPanel,
#topUpLabel,
#topUpLabelLeft {
  /* background: #373d5c69 !important; */
  background: transparent !important;
}

.hud {
  container-type: inline-size;
}