:root {
  color-scheme: dark;
  --gold: #ffcf58;
  --deep-gold: #9b5411;
  --ink: #05080c;
  --stage-scale: .5;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #030303;
  overscroll-behavior: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1;
}

button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 5px solid #fff2a7;
  outline-offset: 4px;
}

.viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(180, 96, 11, .18), transparent 48%),
    #030303;
}

.game-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1080px;
  height: 1920px;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(var(--stage-scale));
  transform-origin: 50% 50%;
  background: #090704;
  isolation: isolate;
  box-shadow: 0 0 80px rgba(0, 0, 0, .9);
}

.full-layer {
  position: absolute;
  inset: 0;
  width: 1080px;
  height: 1920px;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.background-layer {
  z-index: 0;
}

/* 框架与盘面作为同一几何组按中心等比缩放；画布、背景和其他板块保持原坐标。
   普通框透明区 x=80..1003，免费框 x=70..1010；缩放后左右最近边统一锁定在画布宽度3%。 */
.game-stage {
  --frame-zoom: 1.0998916576381365;
  --frame-center-x: 541.5px;
  --frame-center-y: 642.5px;
  --frame-shift-x: -1.5px;
}

.game-stage.free-mode {
  --frame-zoom: 1.08;
  --frame-center-x: 540px;
  --frame-center-y: 648px;
  --frame-shift-x: 0px;
}

.frame-layer {
  z-index: 2;
  filter: saturate(1.12) contrast(1.03);
  transform-origin: var(--frame-center-x) var(--frame-center-y);
  transform: translateX(var(--frame-shift-x)) scale(var(--frame-zoom));
}

.game-stage.free-mode .frame-layer {
  filter: saturate(1.18) contrast(1.04);
}

.ambient-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 221, 125, .22), transparent 18%),
    linear-gradient(180deg, rgba(0, 0, 0, .12), transparent 42%, rgba(0, 0, 0, .22));
  opacity: .86;
}

.numeric {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}

.player-bar {
  position: absolute;
  left: 34px;
  top: 36px;
  z-index: 7;
  width: 650px;
  height: 112px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 26px 10px 12px;
  border: 2px solid rgba(255, 199, 76, .72);
  border-radius: 56px 22px 22px 56px;
  background: linear-gradient(90deg, rgba(3, 8, 13, .95), rgba(7, 13, 19, .8));
  box-shadow: inset 0 0 24px rgba(255, 158, 32, .12), 0 8px 24px rgba(0, 0, 0, .45);
}

.player-avatar {
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 4px solid #f5bc43;
  border-radius: 50%;
  overflow: hidden;
  color: #fff1af;
  font-family: STKaiti, KaiTi, serif;
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 5px #000;
  background: radial-gradient(circle at 35% 25%, #316c88, #082b3c 52%, #061018);
  box-shadow: 0 0 18px rgba(255, 194, 52, .45);
}

.player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.player-name {
  overflow: hidden;
  color: #fff5cf;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 3px 4px #000;
}

.player-id {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin-top: 3px;
  padding: 0;
  color: #d7dce2;
  font-size: 24px;
  line-height: 1.2;
  background: transparent;
}

.copy-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 207, 88, .72);
  border-radius: 8px;
  color: var(--gold);
  font-size: 22px;
}

.vip-badge {
  flex: 0 0 auto;
  min-width: 108px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px solid #f6c64c;
  border-radius: 14px;
  color: #211000;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(#fff0a4, #d78a1d);
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, .5);
}

.vip-badge strong {
  font-size: 30px;
}

.icon-button {
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
}

.icon-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
}

.home-button {
  position: absolute;
  right: 35px;
  top: 38px;
  z-index: 7;
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 7px 7px rgba(0, 0, 0, .55));
}

.jackpot-card {
  position: absolute;
  left: 325px;
  top: 174px;
  z-index: 7;
  width: 430px;
  height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px solid #dc9a2b;
  border-radius: 30px;
  color: #ffdc76;
  background: linear-gradient(180deg, rgba(13, 20, 27, .95), rgba(2, 6, 10, .96));
  box-shadow: inset 0 0 20px rgba(255, 153, 22, .17), 0 0 22px rgba(255, 157, 28, .2);
}

.jackpot-card span {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 5px;
  line-height: 1;
}

.jackpot-card strong {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 6px;
  color: #fff3aa;
  font-size: 38px;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 174, 43, .6);
}

.reel-window {
  position: absolute;
  left: 195px;
  top: 508px;
  z-index: 3;
  width: 705px;
  height: 360px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(29, 131, 174, .13), transparent 72%),
    rgba(1, 5, 9, .38);
  box-shadow: inset 0 0 28px rgba(57, 172, 221, .18);
  contain: layout paint;
  will-change: transform;
  backface-visibility: hidden;
  transform-origin: calc(var(--frame-center-x) - 195px) calc(var(--frame-center-y) - 508px);
  transform: translate3d(var(--frame-shift-x), 0, 0) scale(var(--frame-zoom));
}

.reels {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 141px);
}

.reel {
  position: relative;
  width: 141px;
  height: 360px;
  overflow: hidden;
  contain: strict;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.reel-track {
  position: absolute;
  left: 0;
  top: 0;
  width: 141px;
  will-change: transform;
  transform: translate3d(0, -120px, 0);
  backface-visibility: hidden;
}

.symbol-cell {
  position: relative;
  width: 141px;
  height: 120px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.symbol-cell::before {
  content: "";
  position: absolute;
  inset: 8px 11px;
  border: 1px solid rgba(94, 185, 222, .18);
  border-radius: 18px;
  background: radial-gradient(circle, rgba(16, 62, 81, .16), transparent 70%);
  box-shadow: inset 0 0 11px rgba(37, 151, 197, .12);
}

.symbol-cell img {
  display: block;
  width: 108px;
  height: 108px;
  object-fit: contain;
  clip-path: none;
  filter: none;
  transform: translateZ(0);
  mix-blend-mode: normal;
  -webkit-user-drag: none;
}

.reel:nth-child(2n) .symbol-cell img {
  filter: none;
}

.game-stage.free-mode .symbol-cell::before {
  border-color: rgba(244, 76, 224, .2);
  background: radial-gradient(circle, rgba(128, 18, 101, .17), transparent 70%);
  box-shadow: inset 0 0 12px rgba(255, 55, 208, .13);
}

.game-stage.free-mode .symbol-cell img {
  filter: none;
}

.symbol-cell.is-winning::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 4px solid #ffec87;
  border-radius: 18px;
  box-shadow: 0 0 18px #ff8b14, inset 0 0 18px rgba(255, 164, 31, .55);
  animation: winCellPulse .65s ease-in-out infinite alternate;
}

.symbol-cell.is-winning img {
  animation: symbolWin .65s ease-in-out infinite alternate;
}

.payline-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 705px;
  height: 360px;
  overflow: visible;
  pointer-events: none;
}

.payline-path {
  fill: none;
  stroke: #fff089;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px #ff5b00);
  stroke-dasharray: 930;
  animation: drawLine .7s ease-out both, lineGlow .75s ease-in-out .7s infinite alternate;
}

.round-display {
  position: absolute;
  left: 95px;
  top: 952px;
  z-index: 7;
  width: 890px;
  height: 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 40px;
  text-align: center;
  pointer-events: none;
}

.round-status {
  color: #fff2c7;
  font-size: 35px;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 4px 6px #000, 0 0 12px rgba(255, 172, 42, .55);
}

.round-win {
  min-height: 84px;
  margin-top: 10px;
  color: #ffe16a;
  font-size: 76px;
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: 2px;
  text-shadow: 0 5px 7px #000, 0 0 18px rgba(255, 119, 0, .75);
}

.round-detail {
  min-height: 34px;
  margin-top: 9px;
  color: #e5d8ba;
  font-size: 24px;
  line-height: 1.35;
  text-shadow: 0 3px 4px #000;
}

.free-hud {
  position: absolute;
  left: 40px;
  top: 1328px;
  z-index: 7;
  width: 1000px;
  height: 92px;
  display: grid;
  grid-template-columns: 260px 300px 180px 230px;
  gap: 10px;
  transition: opacity .25s ease, transform .25s ease;
}

.free-hud.is-hidden {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}

.hud-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border: 2px solid rgba(250, 178, 52, .8);
  border-radius: 18px;
  color: #f6e2b5;
  background: rgba(3, 8, 13, .9);
  box-shadow: inset 0 0 14px rgba(255, 143, 17, .12);
}

.hud-panel span {
  font-size: 21px;
  line-height: 1.1;
}

.hud-panel strong {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 5px;
  color: #ffe270;
  font-size: 34px;
  line-height: 1;
}

.retrigger-badge {
  display: grid;
  place-items: center;
  border: 2px solid #ffb541;
  border-radius: 18px;
  color: #fff0c1;
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(118, 20, 4, .93), rgba(48, 4, 2, .94));
  opacity: .6;
}

.retrigger-badge.is-active {
  opacity: 1;
  animation: retriggerPulse .55s ease-in-out 4 alternate;
}

.account-grid {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.metric-card {
  position: absolute;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  text-align: center;
  text-shadow: 0 3px 4px #000;
}

.metric-card span {
  color: #d8c8a3;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.metric-card strong {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 28px);
  overflow: hidden;
  margin-top: 5px;
  color: #fff0a2;
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
}

.balance-card {
  left: 40px;
  top: 1426px;
  width: 260px;
  background-image: url("../05_界面/余额底框.png");
}

.line-bet-card {
  left: 310px;
  top: 1426px;
  width: 180px;
  background-image: url("../05_界面/单线押注底框.png");
}

.total-bet-card {
  left: 500px;
  top: 1426px;
  width: 180px;
  background-image: url("../05_界面/总押注底框.png");
}

.win-card {
  left: 690px;
  top: 1426px;
  width: 350px;
  background-image: url("../05_界面/中奖金额底框.png");
}

.total-win-card {
  left: 40px;
  top: 1526px;
  width: 300px;
  background-image: url("../05_界面/累计中奖底框.png");
}

.primary-controls,
.secondary-controls {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.primary-controls button,
.secondary-controls button {
  pointer-events: auto;
}

.image-control,
.mini-control,
.wide-control,
.spin-control,
.text-control {
  position: absolute;
  overflow: hidden;
  padding: 0;
  border-radius: 20px;
  color: #ffe69a;
  background: rgba(2, 7, 12, .82);
  filter: drop-shadow(0 7px 7px rgba(0, 0, 0, .5));
  transition: filter .15s ease, transform .12s ease, opacity .15s ease;
}

.image-control:active,
.mini-control:active,
.wide-control:active,
.spin-control:active,
.text-control:active {
  transform: translateY(2px) scale(.96);
}

.image-control[disabled],
.mini-control[disabled],
.wide-control[disabled],
.spin-control[disabled],
.text-control[disabled] {
  cursor: default;
  filter: grayscale(.7) brightness(.55);
  opacity: .58;
}

.image-control.is-active,
.mini-control[aria-pressed="true"].is-active,
.spin-control.is-stopping {
  filter: drop-shadow(0 0 12px rgba(255, 202, 70, .9));
}

.image-control img {
  position: absolute;
  left: 50%;
  top: 3px;
  width: 92%;
  height: 80%;
  object-fit: contain;
  transform: translateX(-50%);
  clip-path: none;
  -webkit-user-drag: none;
}

.control-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  color: #ffe49b;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 3px 4px #000;
}

.collect-control { left: 40px; top: 1638px; width: 178px; height: 126px; }
.turbo-control { left: 232px; top: 1638px; width: 136px; height: 126px; }
.bet-down-control { left: 382px; top: 1638px; width: 126px; height: 126px; }
.bet-up-control { left: 522px; top: 1638px; width: 126px; height: 126px; }
.auto-control { left: 662px; top: 1638px; width: 136px; height: 126px; }

.turbo-control,
.auto-control {
  border: 3px solid #d99b2d;
  background: linear-gradient(180deg, #1c3342, #071018 72%);
  box-shadow: inset 0 0 12px rgba(255, 207, 88, .2);
}

.turbo-control img,
.auto-control img {
  display: none;
}

.turbo-control .control-label,
.auto-control .control-label {
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 28px;
}

.spin-control {
  left: 820px;
  top: 1618px;
  width: 220px;
  height: 166px;
  display: grid;
  place-items: center;
  border-radius: 38px;
  background: radial-gradient(circle, rgba(14, 25, 31, .92), rgba(2, 6, 10, .96));
}

.spin-control img {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 152px;
  height: 132px;
  object-fit: contain;
  transform: translateX(-50%);
  clip-path: none;
  -webkit-user-drag: none;
}

.spin-control span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  color: #fff0b0;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 3px 5px #000;
}

.wide-control {
  left: 40px;
  top: 1796px;
  width: 178px;
  height: 78px;
  border: 2px solid rgba(255, 190, 49, .7);
}

.wide-control img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  clip-path: none;
  -webkit-user-drag: none;
}

.wide-control span {
  position: relative;
  z-index: 2;
  font-size: 27px;
  font-weight: 900;
  line-height: 78px;
  text-shadow: 0 3px 5px #000;
}

.mini-control {
  top: 1790px;
  width: 104px;
  height: 90px;
  background: transparent;
}

.mini-control img {
  position: absolute;
  left: 50%;
  top: 0;
  width: 68px;
  height: 68px;
  object-fit: contain;
  transform: translateX(-50%);
  clip-path: none;
  -webkit-user-drag: none;
}

.mini-control span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  color: #ffe6a0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-shadow: 0 3px 4px #000;
}

#menuButton { left: 230px; }
#helpButton { left: 338px; }
#sfxButton { left: 446px; }
#musicButton { left: 554px; }

.mini-control[aria-pressed="false"] {
  filter: grayscale(1) brightness(.58);
}

.mini-control[aria-pressed="false"]::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 31px;
  z-index: 3;
  width: 58px;
  height: 6px;
  border-radius: 6px;
  background: #ff4c32;
  transform: rotate(-42deg);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .7);
}

.text-control {
  top: 1801px;
  width: 114px;
  height: 64px;
  border: 2px solid rgba(243, 175, 49, .85);
  border-radius: 18px;
  color: #ffe69b;
  font-size: 24px;
  font-weight: 900;
  line-height: 60px;
  text-shadow: 0 3px 4px #000;
  background: linear-gradient(180deg, rgba(23, 40, 51, .95), rgba(4, 10, 15, .98));
}

.text-control:nth-of-type(6) { left: 674px; }
.text-control:nth-of-type(7) { left: 796px; }
.text-control:nth-of-type(8) { left: 918px; }

.toast {
  position: absolute;
  left: 50%;
  top: 1260px;
  z-index: 25;
  min-width: 300px;
  max-width: 860px;
  min-height: 58px;
  padding: 13px 28px;
  border: 2px solid rgba(255, 201, 80, .8);
  border-radius: 29px;
  color: #fff3cc;
  font-size: 26px;
  line-height: 1.2;
  text-align: center;
  background: rgba(2, 7, 11, .94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.feature-overlay {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffe689;
  background: rgba(0, 0, 0, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.feature-overlay.is-visible {
  opacity: 1;
}

.feature-overlay img {
  position: relative;
  z-index: 2;
  width: 430px;
  height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(255, 137, 19, .85));
  animation: featureFloat 1.1s ease-in-out infinite alternate;
}

.feature-overlay h2 {
  position: relative;
  z-index: 3;
  margin: -72px 0 0;
  color: #fff0a4;
  font-size: 64px;
  line-height: 1.1;
  text-shadow: 0 5px 6px #000, 0 0 20px #ef7311;
}

.feature-overlay strong {
  position: relative;
  z-index: 3;
  margin-top: 18px;
  color: #fff27d;
  font-size: 78px;
  line-height: 1;
  text-shadow: 0 5px 7px #000, 0 0 18px #ff5a00;
}

.feature-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 920px;
  height: 920px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 208, 96, .17) 0 6deg, transparent 6deg 15deg);
  transform: translate(-50%, -50%);
  animation: raySpin 5s linear infinite;
}

.modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(6px);
}

.menu-dialog {
  position: absolute;
  left: 75px;
  top: 230px;
  width: 930px;
  height: 1470px;
  overflow: hidden;
  border: 5px solid #cf8626;
  border-radius: 32px;
  color: #f7ead0;
  background: linear-gradient(180deg, #111a22, #050a0f 55%, #0a0704);
  box-shadow: inset 0 0 38px rgba(255, 160, 31, .13), 0 20px 70px #000;
}

.dialog-header {
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid rgba(231, 158, 42, .5);
  background: linear-gradient(180deg, rgba(109, 45, 8, .75), rgba(12, 17, 22, .7));
}

.dialog-header h2 {
  margin: 0;
  color: #ffe18a;
  font-size: 48px;
  letter-spacing: 8px;
  text-shadow: 0 4px 5px #000;
}

.dialog-close {
  position: absolute;
  right: 22px;
  top: 18px;
  z-index: 4;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 2px solid #d59132;
  border-radius: 50%;
  color: #ffe6a4;
  font-size: 50px;
  line-height: 1;
  background: #17232c;
}

.menu-tabs {
  height: 98px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 2px solid rgba(223, 149, 41, .45);
}

.tab-button {
  border: 2px solid #7d571f;
  border-radius: 17px;
  color: #ddcfad;
  font-size: 25px;
  font-weight: 800;
  background: #101921;
}

.tab-button.is-active {
  border-color: #ffd56b;
  color: #241200;
  background: linear-gradient(#ffed9c, #cf7b18);
  box-shadow: 0 0 15px rgba(255, 177, 35, .42);
}

.dialog-content {
  height: 1250px;
  overflow: hidden;
}

.tab-panel {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 28px 34px 48px;
  scrollbar-color: #b36f20 #071017;
  scrollbar-width: thin;
}

.tab-panel.is-active {
  display: block;
}

.tab-panel h3 {
  margin: 0 0 14px;
  color: #ffd96d;
  font-size: 38px;
  line-height: 1.3;
}

.tab-panel h4 {
  margin: 0 0 8px;
  color: #ffe293;
  font-size: 28px;
}

.tab-panel p {
  margin: 0 0 20px;
  color: #eee2c7;
  font-size: 25px;
  line-height: 1.65;
}

.payline-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.payline-card {
  overflow: hidden;
  border: 2px solid #815a22;
  border-radius: 16px;
  background: #05090d;
}

.payline-card img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
}

.payline-card span {
  display: block;
  height: 42px;
  color: #ffe195;
  font-size: 22px;
  font-weight: 800;
  line-height: 42px;
  text-align: center;
}

.paytable-wrap {
  overflow: hidden;
  border: 2px solid #8e6222;
  border-radius: 18px;
}

.paytable-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 25px;
}

.paytable-table th,
.paytable-table td {
  height: 70px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(190, 132, 40, .35);
  text-align: center;
}

.paytable-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #1e1000;
  font-size: 26px;
  background: #e0a13b;
}

.paytable-table td:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.paytable-table td img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  clip-path: none;
  mix-blend-mode: normal;
}

.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.rules-grid section {
  padding: 22px;
  border: 2px solid rgba(188, 126, 35, .55);
  border-radius: 18px;
  background: rgba(15, 25, 32, .72);
}

.rules-grid p {
  margin-bottom: 0;
  font-size: 23px;
  line-height: 1.55;
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 20px;
  border: 2px dashed #a96e25;
  border-radius: 18px;
  font-size: 23px;
}

.demo-controls button {
  min-height: 54px;
  padding: 0 16px;
  border: 2px solid #ca8c2f;
  border-radius: 14px;
  color: #ffebb0;
  font-size: 21px;
  background: #17242d;
}

.story-copy {
  padding: 28px;
  border: 2px solid rgba(202, 139, 43, .55);
  border-radius: 22px;
  background:
    radial-gradient(circle at 70% 15%, rgba(255, 126, 21, .13), transparent 28%),
    rgba(7, 14, 20, .86);
}

.story-copy p {
  font-size: 28px;
  line-height: 1.85;
}

.gamble-dialog {
  position: absolute;
  left: 170px;
  top: 515px;
  width: 740px;
  min-height: 720px;
  padding: 62px 62px 48px;
  border: 5px solid #ce882b;
  border-radius: 34px;
  color: #f7e7c7;
  text-align: center;
  background: linear-gradient(180deg, #17242c, #050a0e);
  box-shadow: inset 0 0 45px rgba(255, 153, 27, .15), 0 20px 70px #000;
}

.gamble-dialog h2 {
  margin: 0 0 18px;
  color: #ffdc76;
  font-size: 54px;
}

.gamble-dialog p {
  margin: 12px 0;
  font-size: 26px;
}

.gamble-amount {
  display: block;
  margin: 22px 0;
  color: #fff19a;
  font-size: 70px;
  text-shadow: 0 0 18px #dc6b11;
}

.gamble-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 32px;
}

.gamble-options button {
  height: 190px;
  border: 4px solid #da9b39;
  border-radius: 28px;
  color: #fff0bb;
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(180deg, #604015, #160c03);
}

.gamble-options button:last-child {
  border-color: #55c7c4;
  background: linear-gradient(180deg, #15515a, #03191c);
}

.gamble-options span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto 12px;
  border: 3px solid currentColor;
  border-radius: 50%;
  font-size: 44px;
}

.gamble-collect {
  width: 100%;
  height: 76px;
  margin-top: 32px;
  border: 2px solid #bf8433;
  border-radius: 20px;
  color: #ffe9aa;
  font-size: 28px;
  font-weight: 800;
  background: #17242d;
}

.loading-screen {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffe7a0;
  background:
    radial-gradient(circle at 50% 42%, rgba(190, 84, 7, .34), transparent 30%),
    rgba(2, 4, 6, .98);
  transition: opacity .45s ease, visibility .45s ease;
}

.loading-screen.is-complete {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loading-emblem {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  border: 5px solid #e9ad3f;
  border-radius: 50%;
  color: #ffdf77;
  font-family: STKaiti, KaiTi, serif;
  font-size: 112px;
  font-weight: 900;
  line-height: 1;
  background: radial-gradient(circle, #153849, #041019 70%);
  box-shadow: 0 0 48px rgba(255, 126, 11, .42), inset 0 0 30px rgba(255, 188, 57, .16);
  animation: emblemPulse 1.5s ease-in-out infinite alternate;
}

.loading-screen h1 {
  margin: 40px 0 46px;
  color: #ffe088;
  font-size: 70px;
  letter-spacing: 13px;
  text-shadow: 0 5px 6px #000, 0 0 22px rgba(255, 128, 12, .6);
}

.loading-track {
  width: 650px;
  height: 28px;
  overflow: hidden;
  border: 3px solid #c98229;
  border-radius: 14px;
  background: #080c10;
  box-shadow: inset 0 3px 8px #000;
}

.loading-bar {
  width: 0;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #9b3a09, #ffb62f, #fff099);
  box-shadow: 0 0 16px rgba(255, 159, 28, .7);
  transition: width .18s ease;
}

.loading-text {
  margin-top: 20px;
  color: #e8d5ad;
  font-size: 26px;
}

@keyframes symbolWin {
  from { transform: scale(1); filter: brightness(1) drop-shadow(0 4px 4px #000); }
  to { transform: scale(1.09); filter: brightness(1.32) drop-shadow(0 0 12px #ff8c1a); }
}

@keyframes winCellPulse {
  from { opacity: .45; }
  to { opacity: 1; }
}

@keyframes drawLine {
  from { stroke-dashoffset: 930; opacity: 0; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes lineGlow {
  from { stroke-width: 6; opacity: .65; }
  to { stroke-width: 10; opacity: 1; }
}

@keyframes retriggerPulse {
  from { transform: scale(1); box-shadow: 0 0 0 rgba(255, 110, 11, 0); }
  to { transform: scale(1.05); box-shadow: 0 0 24px rgba(255, 110, 11, .9); }
}

@keyframes featureFloat {
  from { transform: scale(.96); }
  to { transform: scale(1.06); }
}

@keyframes raySpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes emblemPulse {
  from { transform: scale(.96); filter: brightness(.92); }
  to { transform: scale(1.04); filter: brightness(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .loading-emblem { animation-duration: 4s; }
}
