:root {
  --app-base-width: 560px;
  --app-base-height: 610px;
  --app-scale: 1;
  --panel-text: #f4fbff;
  --panel-shadow: rgba(4, 27, 50, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
}

body {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden !important;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: "transparent";
  color: var(--panel-text);
}

body,
body * {
  -webkit-user-select: none;
  user-select: none;
}

button,
img {
  -webkit-user-drag: none;
}

.app-loader {
  position: absolute;
  inset: 0;
  /* acima de toda a UI do jogo (turbo/ajuda z-index 20, paineis z-index 300);
     abaixo de toast (999) e fatal-error (9999) */
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: inherit;
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(72, 178, 219, 0.18),
      transparent 32%
    ),
    rgba(2, 10, 21, 0.92);
}

.app-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.app-loader-card {
  width: min(320px, 100%);
  padding: 22px 18px;
  border: 1px solid rgba(123, 219, 255, 0.2);
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(9, 28, 49, 0.96),
    rgba(4, 14, 25, 0.96)
  );
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
}

.app-loader-title,
.app-loader-status,
.app-loader-progress {
  display: block;
}

.app-loader-title {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.app-loader-status {
  margin-bottom: 14px;
  color: rgba(231, 247, 255, 0.82);
  font-size: 14px;
}

.app-loader-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.app-loader-bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54d0ff, #9df2ff);
  transition: width 0.16s ease;
}

.app-loader-progress {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(231, 247, 255, 0.72);
}

.container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: var(--app-base-width);
  height: var(--app-base-height);
  margin: auto auto 0;
  transform: scale(var(--app-scale));
  transform-origin: bottom center;
  background: none;
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.container
  > *:not(.app-loader):not(.frame-layer):not(.result-overlay-shell):not(
    .slot-blue-panel
  ) {
  transform: translateY(50px);
}

.frame-layer {
  position: absolute;
  inset: 0;
  background: url("assets/images/frame.png") center/100% 120% no-repeat;
  z-index: 2;
  pointer-events: none;
}

.shell::before {
  content: none;
}

.shell::after {
  content: none;
}

.slot-side {
  display: none;
}

.slot-side-left {
  left: -6px;
  bottom: 42px;
  width: 126px;
}

.slot-side-right {
  right: -8px;
  width: 164px;
  bottom: -2px;
}

.layout-top {
  position: absolute;
  top: -12px;
  left: 22px;
  right: 22px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
}

.slot-back {
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.slot-back img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.slot-back:hover {
  opacity: 0.85;
}

.mute {
  border: none;
  outline: none;
  width: 56px;
  height: 56px;
  background-color: transparent;
  background-image: url("assets/images/sound-on.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  cursor: pointer;
  z-index: 6;
}

.mute.unmute {
  background-image: url("assets/images/sound-off.png");
}

.layout-center {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: 456px;
  max-width: 560px;
  margin: -12px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding-left: 0;
}

.layout-center::before {
  content: none;
}

.layout-center::after {
  content: none;
}

#slot {
  margin-top: 0;
  position: relative;
  z-index: 1;
  width: 455px;
  height: 295px;
  overflow: visible;
  border-radius: 10px;
  transform: translateY(12px);
  background: url("assets/images/frame-reels-bg.png") center/100% 150% no-repeat;
}

#slot::before {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -30px;
  left: -10px;
  z-index: 0;
  pointer-events: none;
  background: url("assets/images/frame-reels-bg.png") center/100% 100% no-repeat;
}

#reels {
  display: flex;
  align-content: stretch;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 100%;
  max-height: calc(90vh - 50px - 40px);
  padding-left: 4px;
  padding-right: 6px;
  box-sizing: border-box;
}

.reel {
  display: flex;
  flex: 1 1 20%;
  align-content: stretch;
  overflow: hidden;
  position: relative;
  height: 100%;
  padding: 0 2px;
  box-sizing: border-box;
}

.icons {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
}

.slot-cell {
  position: relative;
  width: calc(95% + 1px);
  flex: 1 1 0;
  min-height: 0;
  margin: -6px 5px 0 3px;
  padding-top: 0;
  border-radius: 16px;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  box-sizing: border-box;
}

.slot-cell::before {
  content: "";
  position: absolute;
  inset: 8px 6px 10px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 28%),
    rgba(4, 39, 74, 0.12);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.slot-cell img {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  width: 88%;
  height: 88%;
  padding: 0;
  object-fit: contain;
  z-index: 1;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.slot-effect {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
  background-image: url("assets/images/slot-effect-icon-reel.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 92% 92%;
  transform: translateY(0);
  transition:
    opacity 0.16s ease,
    visibility 0.16s ease;
  visibility: hidden;
}

.slot-cell.is-highlight::before {
  opacity: 0;
}

.slot-cell.is-highlight .slot-effect {
  opacity: 1;
  visibility: visible;
  animation: effect-pulse 0.9s ease-in-out infinite;
}

.slot-cell.is-highlight img {
  animation: symbol-win 0.85s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  filter: drop-shadow(0 0 10px rgba(255, 224, 117, 0.95))
    drop-shadow(0 0 24px rgba(255, 164, 28, 0.6));
}

.reel.is-spinning .icons {
  animation: reel-shimmer 0.2s linear infinite;
}

.reel.is-spinning .slot-cell img {
  filter: blur(1px) saturate(1.1);
  transform: scale(0.98);
}

.layout-points {
  position: relative;
  z-index: 10;
  margin-top: -85px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
}

#fast-forward {
  position: absolute;
  left: 52px;
  bottom: 124px;
  z-index: 20;
  transform: translateX(-50%) translateY(24px);
}

#fast-alert {
  position: absolute;
  left: 112px;
  bottom: 124px;
  z-index: 20;
  transform: translateX(-50%) translateY(24px);
}

.slot-blue-panel {
  position: absolute;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(160, 226, 255, 0.25),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      rgba(47, 187, 255, 0.96) 0%,
      rgba(19, 46, 151, 0.98) 100%
    );
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.slot-blue-panel.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.slot-blue-panel-card {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 28px 24px;
  overflow-y: auto;
  border: 2px solid rgba(255, 228, 170, 0.5);
  border-radius: 22px;
  background: rgba(10, 32, 111, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
  scroll-behavior: smooth;
}

.slot-blue-panel-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 92px;
  padding: 10px 14px;
  border: 2px solid rgba(255, 228, 170, 0.55);
  border-radius: 14px;
  background: rgba(8, 24, 82, 0.72);
  color: #fff7d6;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.22);
}

.slot-blue-panel-close:hover {
  filter: brightness(1.08);
}

.slot-blue-panel-title {
  display: block;
  margin-bottom: 14px;
  color: #fff7d6;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-align: center;
}

.slot-blue-panel-list {
  margin: 0;
  padding-left: 22px;
  color: #eef7ff;
  font-size: 16px;
  line-height: 1.45;
}

.slot-blue-panel-list li + li {
  margin-top: 10px;
}

#value-earning {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 286px;
  height: 54px;
  padding: 0 18px;
  color: #fff7d6;
  font-size: 14px;
  border: 2px solid rgba(255, 211, 103, 0.95);
  border-radius: 18px;
  background: linear-gradient(180deg, #3247d9 0%, #1a2488 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.24),
    0 8px 18px rgba(0, 0, 0, 0.24);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

#value-earning::before {
  content: none;
}

.item4-col-1::before,
.item4-col-3::before,
.item4-col-2::before,
.item4-col-4::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: transparent;
  pointer-events: none;
}

.panel-label {
  position: relative;
  z-index: 1;
  display: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  opacity: 0.72;
}

#value-earning-number,
#coins-number,
#value-bet-number {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

#value-earning-number {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

#coins-number {
  font-size: 18px;
  font-weight: 900;
  transform: translateY(-1px) translateX(-25px);
  width: 100%;
  text-align: left;
}

#value-bet-number {
  font-size: 21px;
  font-weight: 900;
}

.layout-bottom {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: 138px 1fr 138px;
  align-items: end;
  margin-top: 1px;
  margin-right: 0;
  padding: 12px 18px 18px;
  gap: 12px;
  width: 100%;
  transform: translateY(-40px);
}

.layout-bottom-group1 {
  position: relative;
  z-index: 13;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 138px;
  max-width: 138px;
  transform: translate(0, -44px);
  transform-origin: center center;
}

.layout-bottom-group2 {
  position: relative;
  z-index: 13;
  display: grid;
  grid-template-columns: repeat(2, 74px);
  grid-template-areas:
    "bet bet"
    "decrease increase";
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 10px 14px;
  width: 100%;
  max-width: none;
  transform: translate(0, -40px);
  transform-origin: center center;
}

.layout-bottom-group2 > * {
  transform: none;
}

.layout-bottom-group3 {
  position: relative;
  z-index: 14;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 138px;
  max-width: 138px;
  transform: translate(0, -40px);
}

.item4-col-1,
.item4-col-3 {
  position: relative;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item4-col-1 {
  width: 138px;
  min-width: 138px;
  max-width: 138px;
  height: 54px;
  justify-content: flex-start;
  padding-left: 40px;
  border: 2px solid rgba(255, 206, 91, 0.95);
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(109, 52, 10, 0.96),
    rgba(80, 34, 8, 0.96)
  );
  box-shadow:
    inset 0 2px 0 rgba(255, 233, 184, 0.22),
    0 8px 18px rgba(0, 0, 0, 0.28);
}

.item4-col-3 {
  grid-area: bet;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  height: 56px;
  flex-direction: column;
  gap: 3px;
  border: 2px solid rgba(255, 214, 119, 0.95);
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(99, 47, 11, 0.96),
    rgba(72, 30, 7, 0.96)
  );
  box-shadow:
    inset 0 2px 0 rgba(255, 231, 176, 0.24),
    0 8px 18px rgba(0, 0, 0, 0.22);
}

#coins,
#value-bet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #fff3cf;
  text-shadow: 0 1px 1px var(--panel-shadow);
}

#coins {
  width: 100%;
  align-items: flex-start;
  justify-content: flex-start;
}

#coins-number {
  width: 100%;
  text-align: left;
}

#value-bet::after {
  content: "TOTAL BET";
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 220, 129, 0.95);
}

.item4-col-2,
.item4-col-4 {
  position: relative;
  width: 74px;
  min-width: 74px;
  max-width: 74px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(180deg, #edf0ff 0%, #b9c3ff 100%);
  border: 2px solid rgba(71, 56, 127, 0.82);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.82),
    0 6px 12px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.item4-col-2 {
  grid-area: decrease;
  margin-right: 0;
}

.item4-col-4 {
  grid-area: increase;
  margin-left: 0;
}

.item4-col-2-decrease {
  transform: none;
}

.item4-col-4-increase {
  transform: none;
}

#increase-value-bet,
#decrease-value-bet {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  outline: none;
  border: none;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
  color: #47367f;
  font-size: 34px;
  font-weight: 900;
}

#decrease-value-bet::before {
  content: "-";
}

#increase-value-bet::before {
  content: "+";
}

#increase-value-bet:hover,
#decrease-value-bet:hover {
  background: rgba(255, 255, 255, 0.18);
}

.button-1 {
  width: 124px;
  height: 124px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.button-1-small {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  margin-left: 0;
  transform: translate(3px, -1px);
}

.button-1-front {
  position: relative;
  width: 124px;
  height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("assets/images/spin.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: translateY(0);
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

#spin .button-1-front {
  border: 3px solid rgba(255, 211, 103, 0.95);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 35% 30%,
      rgba(160, 226, 255, 0.9),
      transparent 28%
    ),
    linear-gradient(180deg, #2fbbff 0%, #1f56d6 52%, #132e97 100%);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.28),
    inset 0 -8px 18px rgba(5, 18, 76, 0.35),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

#spin .button-1-front::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 2px solid rgba(255, 234, 178, 0.45);
  pointer-events: none;
}

.button-1-small .button-1-front {
  width: 62px;
  height: 62px;
}

#fast-forward .button-1-front,
#fast-alert .button-1-front {
  z-index: 999;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 211, 103, 0.95);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 35% 30%,
      rgba(160, 226, 255, 0.9),
      transparent 28%
    ),
    linear-gradient(180deg, #2fbbff 0%, #1f56d6 52%, #132e97 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -4px 10px rgba(5, 18, 76, 0.35),
    0 6px 14px rgba(0, 0, 0, 0.24);
  transform: translate(0, 0);
}

#fast-forward .button-1-front::before,
#fast-alert .button-1-front::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 234, 178, 0.45);
  pointer-events: none;
}

.button-1-front-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transform: translateY(-3px);
}

#spin .button-1-front-text::before {
  content: "SPIN";
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow:
    0 2px 0 rgba(8, 27, 98, 0.55),
    0 6px 12px rgba(0, 0, 0, 0.3);
}

.button-1-small .button-1-front-text {
  width: 38px;
  height: 38px;
  transform: translateY(0);
}

.fast-forward-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: translateX(3px) scale(1);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}

.fast-forward-icon svg {
  width: 30px;
  height: 30px;
  overflow: visible;
}

.fast-forward-chevron {
  fill: none;
  stroke: #ffffff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(8, 27, 98, 0.55))
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
  opacity: 0.9;
}

.fast-forward-chevron-1 {
  animation: none;
}

.fast-forward-chevron-2 {
  animation: none;
}

#fast-forward.is-active .button-1-front-text,
#fast-forward[aria-pressed="true"] .button-1-front-text {
  opacity: 0;
}

#fast-forward.is-active .fast-forward-chevron-1,
#fast-forward[aria-pressed="true"] .fast-forward-chevron-1 {
  animation: fast-forward-pulse 0.7s ease-in-out infinite;
}

#fast-forward.is-active .fast-forward-chevron-2,
#fast-forward[aria-pressed="true"] .fast-forward-chevron-2 {
  animation: fast-forward-pulse 0.7s ease-in-out infinite 0.12s;
}

#fast-alert .button-1-front-text::before {
  content: "!";
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow:
    0 1px 0 rgba(8, 27, 98, 0.55),
    0 3px 6px rgba(0, 0, 0, 0.3);
}

.button-1:hover .button-1-front {
  filter: brightness(1.07);
}

.button-1:active .button-1-front {
  transform: translateY(-2px);
}

.button-1.is-active .button-1-front,
.button-1[aria-pressed="true"] .button-1-front {
  filter: saturate(1.2) brightness(1.08);
}

.button-1:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.82;
}

.toast-container {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  min-width: 180px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(5, 24, 44, 0.92);
  border: 1px solid rgba(125, 232, 255, 0.18);
  color: #eefcff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  animation: toast-in 0.18s ease;
}

.win-overlay,
.result-overlay-shell {
  position: absolute;
  inset: 0;
  z-index: 201;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
  will-change: opacity, transform;
}

.win-overlay.is-visible,
.result-overlay-shell.is-visible {
  opacity: 1;
  visibility: visible;
  animation: win-overlay-hit 0.42s cubic-bezier(0.2, 0.9, 0.22, 1);
}

.win-overlay::before,
.result-overlay-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(255, 235, 141, 0.28),
      transparent 30%
    ),
    rgba(1, 10, 22, 0.48);
  pointer-events: none;
  animation: win-overlay-flash 0.8s ease-out;
}

.win-overlay-lottie,
.result-lottie {
  position: relative;
  z-index: 1;
  width: 530px;
  height: 300px;
  transform: scale(1.66);
  transform-origin: center center;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.34))
    drop-shadow(0 0 28px rgba(255, 211, 107, 0.45));
  animation: win-lottie-pulse 1s ease-in-out infinite;
}

.win-overlay-points,
#slot-earning-container {
  position: absolute;
  left: 50%;
  bottom: 137px;
  transform: translateX(-50%) translateY(-60px);
  min-width: 170px;
  min-height: 46px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-shadow:
    0 3px 6px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(255, 210, 101, 0.72);
  animation: win-points-pulse 0.78s ease-in-out infinite;
}

.result-overlay-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.toast.is-error {
  border-color: rgba(255, 124, 146, 0.28);
}

.toast.is-success {
  border-color: rgba(109, 255, 191, 0.24);
}

.fatal-error {
  position: absolute;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 9, 19, 0.9);
}

.fatal-error-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 280px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 132, 132, 0.3);
  background: rgba(17, 34, 56, 0.96);
  color: #fff;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.fatal-error-card strong {
  font-size: 16px;
  font-weight: 800;
}

.fatal-error-card span {
  font-size: 13px;
  line-height: 1.4;
}

@keyframes reel-shimmer {
  0% {
    transform: translateY(-6px);
  }

  100% {
    transform: translateY(6px);
  }
}

@keyframes effect-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.88))
      drop-shadow(0 0 20px rgba(255, 164, 28, 0.5));
    opacity: 1;
  }

  50% {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1))
      drop-shadow(0 0 38px rgba(255, 164, 28, 0.95));
    opacity: 0.95;
  }
}

@keyframes symbol-win {
  0%,
  100% {
    transform: scale(1) translateY(0);
  }

  50% {
    transform: scale(1.12) translateY(-3px);
  }
}

@keyframes win-overlay-hit {
  0% {
    transform: scale(0.94);
  }

  38% {
    transform: scale(1.05);
  }

  65% {
    transform: scale(0.985);
  }

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

@keyframes win-overlay-flash {
  0% {
    opacity: 0;
  }

  22% {
    opacity: 1;
  }

  100% {
    opacity: 1;
  }
}

@keyframes win-lottie-pulse {
  0%,
  100% {
    transform: scale(1.62);
  }

  50% {
    transform: scale(1.72);
  }
}

@keyframes win-points-pulse {
  0%,
  100% {
    transform: translateX(-50%) translateY(-80px) scale(1);
  }

  50% {
    transform: translateX(-50%) translateY(-80px) scale(1.12);
  }
}

@keyframes fast-forward-pulse {
  0% {
    opacity: 0.38;
    transform: translateX(-4px);
  }

  50% {
    opacity: 1;
    transform: translateX(2px);
  }

  100% {
    opacity: 0.45;
    transform: translateX(7px);
  }
}

.result-overlay-shell[data-win-tier="super"] .result-lottie,
.result-overlay-shell[data-win-tier="epic"] .result-lottie,
.result-overlay-shell[data-win-tier="mega"] .result-lottie,
.result-overlay-shell[data-win-tier="ultimate"] .result-lottie {
  transform: scale(1.74);
}

.result-overlay-shell[data-win-tier="super"] #slot-earning-container,
.result-overlay-shell[data-win-tier="epic"] #slot-earning-container,
.result-overlay-shell[data-win-tier="mega"] #slot-earning-container,
.result-overlay-shell[data-win-tier="ultimate"] #slot-earning-container {
  font-size: 36px;
}

.result-overlay-shell[data-win-tier="mega"],
.result-overlay-shell[data-win-tier="ultimate"] {
  animation-duration: 0.52s;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* remove o quadrado sombreado do tap no Android WebView */
* {
  -webkit-tap-highlight-color: transparent;
}
button {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================================
   Fortune Gem — reel especial de multiplicador, Extra Bet e Roleta da Sorte
   ========================================================================= */

.reel-special {
  border-left: 2px solid rgba(255, 205, 90, 0.55);
  background: linear-gradient(
    180deg,
    rgba(64, 15, 8, 0.85),
    rgba(112, 38, 12, 0.85) 50%,
    rgba(64, 15, 8, 0.85)
  );
  border-radius: 0 12px 12px 0;
}

.special-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.special-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78%;
  height: 74%;
  border-radius: 12px;
  border: 2px solid rgba(255, 214, 110, 0.9);
  background: linear-gradient(180deg, #a3400f, #7c2a08);
  color: #ffe9a8;
  font-family: inherit;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.25),
    0 3px 8px rgba(0, 0, 0, 0.45);
}

.special-badge.is-wheel {
  font-size: 13px;
  background: linear-gradient(180deg, #0f7c37, #085423);
  border-color: rgba(160, 255, 170, 0.9);
  color: #d9ffdc;
}

/* extra bet ativo: badges WHEEL viram "vermelhas" (roleta melhorada) */
#app:has(.extra-bet-toggle.is-active) .special-badge.is-wheel {
  background: linear-gradient(180deg, #b3130f, #6e0705);
  border-color: rgba(255, 170, 160, 0.9);
  color: #ffdcd9;
}

.special-cell.is-center .special-badge {
  border-width: 3px;
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.3),
    0 0 14px rgba(255, 214, 110, 0.55);
}

.special-cell.is-highlight-special .special-badge {
  animation: special-badge-pulse 0.75s ease-in-out infinite;
}

@keyframes special-badge-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      inset 0 2px 6px rgba(255, 255, 255, 0.3),
      0 0 14px rgba(255, 214, 110, 0.65);
  }
  50% {
    transform: scale(1.12);
    box-shadow:
      inset 0 2px 6px rgba(255, 255, 255, 0.4),
      0 0 26px rgba(255, 234, 140, 0.95);
  }
}

/* botao EXTRA BET (EX) — ancorado no canto inferior esquerdo da moldura dos
   reels, como no jogo de referencia */
/* filho direto do .container (como turbo/ajuda): fora do stacking context do
   .layout-center, senao fica atras do frame-layer (z-index 2). O seletor por
   ID vence a regra .container > * que aplica translateY(50px). */
#extra-bet {
  position: absolute;
  left: 36px;
  bottom: 160px;
  z-index: 20;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 10px;
  border: 2px solid rgba(190, 180, 150, 0.55);
  border-radius: 14px;
  background: linear-gradient(180deg, #4a453a, #2d2a22);
  color: rgba(216, 208, 180, 0.75);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.extra-bet-toggle-label {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
}

.extra-bet-toggle-hint {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

/* seletor com ID: precisa vencer a regra base #extra-bet, senao a cor de
   ativado nao aplica (ID ganha de classe) */
#extra-bet.is-active {
  border-color: #ffe9a8;
  background: linear-gradient(180deg, #ffc537, #e07d0a);
  color: #4a2500;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(255, 200, 70, 0.95);
}

#extra-bet.is-active .extra-bet-toggle-hint {
  opacity: 1;
}

/* Roleta da Sorte */
.wheel-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 2, 18, 0.78);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.wheel-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.wheel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 30px 20px;
  border-radius: 26px;
  border: 3px solid rgba(255, 214, 110, 0.95);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 200, 80, 0.22),
      transparent 55%
    ),
    linear-gradient(180deg, #47135e, #22093a 60%, #160526);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 40px rgba(255, 190, 60, 0.3),
    0 16px 50px rgba(0, 0, 0, 0.65);
}

.wheel-overlay.is-visible .wheel-card {
  animation: wheel-card-in 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes wheel-card-in {
  from {
    transform: scale(0.55);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.wheel-title {
  color: #ffe9a8;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(255, 190, 60, 0.55);
}

.wheel-stage {
  position: relative;
  width: 300px;
  height: 300px;
}

/* brilho pulsando atras do disco */
.wheel-glow {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 205, 90, 0.4) 40%,
    rgba(255, 205, 90, 0.12) 62%,
    transparent 72%
  );
  animation: wheel-glow-pulse 1.6s ease-in-out infinite;
}

@keyframes wheel-glow-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  z-index: 4;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 30px solid #ffd75e;
  filter: drop-shadow(0 0 6px rgba(255, 190, 60, 0.9))
    drop-shadow(0 3px 4px rgba(0, 0, 0, 0.6));
}

.wheel-disc {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 10px solid #f7b32f;
  box-sizing: border-box;
  /* 12 segmentos de 30deg centralizados no topo, 4 cores alternadas +
     divisorias douradas finas por cima */
  background:
    repeating-conic-gradient(
      from -15.6deg,
      rgba(255, 220, 130, 0.9) 0deg 1.2deg,
      transparent 1.2deg 30deg
    ),
    repeating-conic-gradient(
      from -15deg,
      #7c2fd9 0deg 30deg,
      #c11812 30deg 60deg,
      #0e8a4c 60deg 90deg,
      #d97706 90deg 120deg
    );
  box-shadow:
    inset 0 0 34px rgba(0, 0, 0, 0.5),
    inset 0 0 8px rgba(255, 255, 255, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.55);
  will-change: transform;
}

.wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 56px;
  height: 26px;
  margin: -13px 0 0 -28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff3cf;
  font-size: 15px;
  font-weight: 900;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.85),
    0 0 8px rgba(0, 0, 0, 0.5);
  transform-origin: center;
  pointer-events: none;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

/* premio sorteado aceso */
.wheel-label.is-winner {
  color: #ffffff;
  text-shadow:
    0 0 10px rgba(255, 230, 130, 1),
    0 0 22px rgba(255, 190, 60, 0.95),
    0 2px 4px rgba(0, 0, 0, 0.85);
  animation: wheel-winner-blink 0.5s ease-in-out infinite;
}

@keyframes wheel-winner-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.55;
  }
}

/* anel estatico de luzes (nao gira com o disco) */
.wheel-rim {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.wheel-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffbe6, #ffd75e 70%);
  box-shadow:
    0 0 6px rgba(255, 215, 94, 0.95),
    0 0 12px rgba(255, 190, 60, 0.6);
  transform-origin: center;
  animation: wheel-dot-blink 0.8s ease-in-out infinite;
}

@keyframes wheel-dot-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  border-radius: 50%;
  border: 4px solid #ffd75e;
  background: radial-gradient(circle at 35% 30%, #fff0b8, #c4841a 75%);
  box-shadow:
    0 0 14px rgba(255, 205, 90, 0.65),
    0 4px 12px rgba(0, 0, 0, 0.55);
}

.wheel-result {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffe9a8;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

/* vira uma "pilula" dourada quando o resultado aparece */
.wheel-result:not(:empty) {
  padding: 5px 22px;
  border-radius: 999px;
  border: 2px solid rgba(255, 214, 110, 0.95);
  background: linear-gradient(180deg, #a3400f, #7c2a08);
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.25),
    0 0 20px rgba(255, 190, 60, 0.6);
  animation: mult-pop-in 0.35s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}

/* efeito "premio x multiplicador" — estoura sobre os reels quando ha ganho de
   linha com multiplicador: valor da linha -> xN -> total */
.mult-pop {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  /* alinhado a esquerda mas DENTRO da moldura dos reels (o slot comeca em
     ~52px; fora disso o painel fica atras da arte do frame); mesma altura da
     celula central do reel especial (de onde o multiplicador sai) */
  justify-content: flex-start;
  padding-left: 64px;
  gap: 12px;
  transform: translateY(12px);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
}

.mult-pop.is-visible {
  opacity: 1;
  visibility: visible;
}

/* painel unico (mesmo fundo): valor parado + "X" fixos; o multiplicador
   desliza da direita (lado do reel especial) ate encaixar no painel */
.mult-pop-panel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 12px;
  border: 2px solid rgba(255, 214, 110, 0.95);
  background: linear-gradient(180deg, #a3400f, #7c2a08);
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.3),
    0 0 26px rgba(255, 190, 60, 0.7),
    0 10px 24px rgba(0, 0, 0, 0.5);
  animation: mult-pop-in 0.35s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}

.mult-pop-panel span {
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow:
    0 3px 8px rgba(0, 0, 0, 0.85),
    0 0 22px rgba(255, 190, 60, 0.55);
}

.mult-pop-value {
  font-size: 19px;
  color: #ffe9a8;
}

.mult-pop-x {
  font-size: 15px;
  color: #ffd75e;
}

.mult-pop-mult {
  font-size: 23px;
  color: #ffd75e;
  will-change: transform;
}

.mult-pop-total {
  font-size: 24px;
  color: #fff3b0;
}


@keyframes mult-pop-in {
  from {
    transform: scale(0.15);
    opacity: 0;
  }
  60% {
    transform: scale(1.3);
    opacity: 1;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}


/* =========================================================================
   Fortune Gem — fundo de cenario (ceu + selva + templo) e brilho animado
   ========================================================================= */

body {
  background: linear-gradient(180deg, #37a5e5 0%, #1e72bb 55%, #123f27 100%);
}

/* cenario dentro do shell (sobrescreve o content:none definido acima) */
.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(
      closest-side at 50% 4%,
      rgba(255, 244, 190, 0.55),
      transparent 72%
    ),
    radial-gradient(
      420px 220px at -4% 96%,
      rgba(9, 62, 33, 0.95),
      transparent 70%
    ),
    radial-gradient(
      420px 220px at 104% 96%,
      rgba(9, 62, 33, 0.95),
      transparent 70%
    ),
    radial-gradient(
      520px 190px at 50% 102%,
      rgba(96, 58, 14, 0.9),
      transparent 75%
    ),
    radial-gradient(
      300px 140px at 18% 78%,
      rgba(18, 92, 48, 0.55),
      transparent 70%
    ),
    radial-gradient(
      300px 140px at 82% 78%,
      rgba(18, 92, 48, 0.55),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      #85d4f5 0%,
      #4faae4 30%,
      #2f86cf 48%,
      #237666 62%,
      #175a36 78%,
      #0e3a22 100%
    );
}

/* brilho deslizando devagar pelo cenario */
.shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.14) 48%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 70%
  );
  background-size: 260% 100%;
  animation: bg-drift 9s linear infinite;
}

@keyframes bg-drift {
  from {
    background-position: 130% 0;
  }

  to {
    background-position: -130% 0;
  }
}

