:root {
  color-scheme: dark;
  font-family: "Arial Black", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #080302;
  --gold: #ffd36a;
  --red: #ff4c32;
  --cyan: #5ff9ff;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; overflow: hidden; }
body { background: radial-gradient(circle at 50% 35%, #592019, #160705 48%, #050201 100%); }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }

.game-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: max(2px, env(safe-area-inset-top)) 2px max(2px, env(safe-area-inset-bottom));
}

.machine {
  position: relative;
  width: min(100cqw, calc(100dvh * 0.5628));
  aspect-ratio: 941 / 1672;
  container-type: inline-size;
  overflow: hidden;
  isolation: isolate;
  background: #160906;
  box-shadow: 0 0 48px rgb(255 78 35 / 38%);
  user-select: none;
}

.machine__skin { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.machine.is-jackpot { animation: jackpot-glow 420ms ease-in-out infinite alternate; }
.machine.is-jackpot-effect::after { position: absolute; z-index: 18; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgb(255 237 86 / 38%), rgb(116 12 5 / 72%)); color: #fff5a2; font-size: clamp(32px, 13cqw, 90px); text-shadow: 0 0 12px #fff, 0 0 32px #ff3c18; content: "超级奖励"; animation: jackpot-burst 480ms ease-in-out infinite alternate; pointer-events: none; }

.marquee {
  position: absolute;
  z-index: 2;
  top: 2.1%;
  left: 21%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 58%;
  color: #fff3bd;
  text-align: center;
  text-shadow: 0 2px #8a210b, 0 0 9px #ff8b33;
}
.marquee span { font-family: Georgia, serif; font-size: clamp(23px, 8.5cqw, 58px); line-height: 1; letter-spacing: 0.08em; }
.marquee strong { color: #ffd052; font-size: clamp(8px, 2.8cqw, 19px); letter-spacing: 0.22em; }

.digital {
  position: absolute;
  z-index: 3;
  top: 13.05%;
  width: 38%;
  height: 6.15%;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
}
.digital--credit { left: 6.2%; }
.digital--win { right: 5.9%; }
.digital span { position: absolute; top: 4%; left: 0; width: 100%; color: #e9d3b5; font-size: clamp(6px, 1.85cqw, 13px); letter-spacing: 0.06em; text-align: center; }
.digital strong { position: absolute; inset: 25% 0 0; display: grid; place-items: center; width: 100%; color: var(--red); font-family: "Courier New", monospace; font-size: clamp(22px, 8.8cqw, 61px); font-variant-numeric: tabular-nums; letter-spacing: -0.06em; line-height: 1; text-align: center; text-shadow: 0 0 5px #ff280f, 0 0 12px #94160a; }
.digital strong.is-long-score { font-size: clamp(10px, 3.8cqw, 28px); letter-spacing: -0.07em; }
.digital strong.is-extra-long-score { font-size: clamp(8px, 3.1cqw, 23px); letter-spacing: -0.09em; }

.wheel {
  position: absolute;
  z-index: 3;
  top: 21.45%;
  left: 11.9%;
  width: 76.2%;
  height: 46.15%;
  pointer-events: none;
}
.wheel-cell {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: max(1px, 0.3cqw) solid #b37b2c;
  border-radius: 5%;
  background: linear-gradient(145deg, #fff4cf, #ead09a);
  box-shadow: inset 0 0 5px rgb(118 62 12 / 32%);
  color: #662111;
  font-size: clamp(17px, 6.2cqw, 44px);
  line-height: 1;
  text-shadow: 0 1px #fff8d6;
  transition: 75ms ease;
}
.wheel-cell span { transform: translateY(-4%); }
.wheel-cell em { margin-left: 0.05em; font-size: 42%; font-style: normal; }
.wheel-cell__single-image { display: grid; width: 78%; height: 78%; place-items: center; }
.item-symbol-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.wheel-cell__triple-image { display: grid; width: 68.6%; height: 68.6%; place-items: center; transform: none !important; }
.wheel-cell__triple-image img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 1px rgb(91 32 0 / 35%)); }
.wheel-cell__seven { position: relative; display: inline-block; width: 1.15em; height: 0.9em; color: #d9251c; font-family: Arial Black, Arial, sans-serif; font-size: 88%; font-weight: 900; line-height: 1; text-shadow: -0.035em -0.035em #fff0a8, 0.035em -0.035em #fff0a8, -0.035em 0.035em #fff0a8, 0.035em 0.035em #fff0a8, 0 0.075em #71130e; }
.wheel-cell__seven i { position: absolute; display: block; width: auto; height: auto; font-style: normal; }
.wheel-cell__seven i:first-child { top: -0.08em; left: 0; z-index: 1; }
.wheel-cell__seven i:last-child { top: 0.12em; left: 0.43em; z-index: 2; }
.wheel-cell__double-star { position: relative; display: inline-block; width: 1.25em; height: 1em; color: #ffd83d; font-family: Arial, sans-serif; font-size: 92%; line-height: 1; text-shadow: -0.035em -0.035em #fff3a4, 0.035em -0.035em #fff3a4, -0.035em 0.035em #c47605, 0.035em 0.035em #c47605, 0 0.09em #7e3d04; }
.wheel-cell__double-star i { position: absolute; display: block; width: auto; height: auto; font-style: normal; }
.wheel-cell__double-star i:first-child { top: 0.25em; left: 0; z-index: 1; font-size: 72%; }
.wheel-cell__double-star i:last-child { top: -0.02em; left: 0.38em; z-index: 2; font-size: 100%; }
.wheel-cell__bar { display: grid; grid-template-rows: repeat(3, 1fr); width: 72%; height: 78%; transform: none !important; color: #17110d; font-family: Arial, sans-serif; font-size: 32%; font-weight: 900; line-height: 1; letter-spacing: 0; text-shadow: none; }
.wheel-cell__bar i { display: grid; place-items: center; background: #17110d; color: #fff; font-style: normal; letter-spacing: 0.04em; }
.wheel-cell__bar strong { display: grid; place-items: center; color: #17110d; font-size: 102%; }
.wheel-cell--bar-red .wheel-cell__bar i { background: #8c2019; }
.wheel-cell--bar-red .wheel-cell__bar strong { color: #8c2019; }
.wheel-cell--luck1 { background: repeating-conic-gradient(from 12deg, #ff9d35 0 16deg, #59c8dc 16deg 32deg); }
.wheel-cell--luck2 { background: repeating-conic-gradient(from 12deg, #7048bd 0 16deg, #f2c84b 16deg 32deg); }
.wheel-cell__luck { display: grid; width: 70%; height: 78%; place-items: center; transform: none !important; }
.wheel-cell__luck img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgb(91 32 0 / 42%)); }
.wheel-cell small { position: absolute; right: 8%; bottom: 6%; color: #7d170c; font-size: 30%; text-shadow: 0 1px #fff0b8; }
.wheel-cell.is-active { border-color: #fffbd2; background: linear-gradient(rgb(255 82 19 / 32%), rgb(255 82 19 / 32%)), linear-gradient(145deg, #fff4cf, #ead09a); box-shadow: inset 0 0 10px #ff471a, 0 0 12px #fff26a, 0 0 24px #ff4c22; transform: scale(1.04); }
.wheel-cell.is-held { z-index: 2; border-color: #fffbd2; background: linear-gradient(rgb(255 204 45 / 28%), rgb(255 204 45 / 28%)), linear-gradient(145deg, #fff4cf, #ead09a); box-shadow: inset 0 0 12px #ff9d24, 0 0 13px #fff56d, 0 0 25px #ffb52e; transform: scale(1.035); }
.wheel-cell.is-sequence-held { z-index: 1; border-color: #ffd755; box-shadow: inset 0 0 10px rgb(255 175 26 / 45%), 0 0 9px #ffba38; }
.wheel-cell.is-send-light { z-index: 2; border-color: #8affef; background: linear-gradient(rgb(45 255 220 / 32%), rgb(45 255 220 / 32%)), linear-gradient(145deg, #fff4cf, #ead09a); box-shadow: inset 0 0 12px #2affd7, 0 0 14px #66ffe9, 0 0 28px #1ad9c2; animation: send-light 420ms ease-in-out infinite alternate; }

.center-panel {
  position: absolute;
  z-index: 4;
  top: 28.85%;
  left: 29.2%;
  width: 41.6%;
  height: 31.65%;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffe6a4;
  text-align: center;
}
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; width: 68%; margin-top: 4%; border: 1px solid #e3a63f; border-radius: 999px; overflow: hidden; background: rgb(32 7 4 / 70%); }
.mode-switch button { padding: 4% 2%; cursor: pointer; border: 0; background: transparent; color: #d6a96b; font-size: clamp(7px, 2.25cqw, 15px); }
.mode-switch button.is-selected { background: linear-gradient(#ffd463, #b94517); color: #4a1006; }
.brand-copy { margin-top: 8%; }
.brand-copy small { color: #ffbc62; font-size: clamp(6px, 1.7cqw, 11px); letter-spacing: 0.12em; }
.brand-copy h1 { margin: 3% 0 2%; color: #fff0a4; font-size: clamp(18px, 6.3cqw, 43px); line-height: 1.05; text-shadow: 0 3px #8e1809, 0 0 10px #ff8c27; }
.brand-copy p { margin: 0; min-height: 2.6em; color: #ffd06d; font-size: clamp(7px, 2.1cqw, 14px); line-height: 1.25; }
.round-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 93%; margin-top: 5%; gap: 2%; }
.round-stats span { padding: 5% 1%; border: 1px solid rgb(255 201 90 / 45%); border-radius: 8%; background: rgb(49 7 4 / 72%); color: #d9a365; font-size: clamp(5px, 1.45cqw, 10px); }
.round-stats strong { display: block; margin-top: 4%; color: #69f7ff; font-family: "Courier New", monospace; font-size: 150%; text-shadow: 0 0 5px #0acdd5; }
.transfer-row { display: grid; grid-template-columns: 1fr 1.05fr 1fr; width: 96%; margin-top: 5%; gap: 2%; }
.transfer-row button { min-height: 2.5em; padding: 3% 1%; cursor: pointer; border: 1px solid #e6af4a; border-radius: 7%; background: linear-gradient(#852b17, #3f100a); color: #ffe0a0; font-size: clamp(5px, 1.45cqw, 10px); }
.feature-badges { display: flex; gap: 4%; justify-content: center; width: 100%; margin-top: 5%; font-size: clamp(5px, 1.45cqw, 10px); }
.feature-badges span { padding: 2% 5%; border-radius: 999px; background: rgb(45 8 3 / 75%); }
.sequence-trail { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1.2%; width: 92%; min-height: 6%; margin-top: 3%; }
.sequence-trail > span { display: grid; aspect-ratio: 1; place-items: center; overflow: hidden; border: 1px solid #dca744; border-radius: 50%; background: color-mix(in srgb, var(--trail-color), #2a0805 55%); font-size: clamp(7px, 2.2cqw, 15px); }
.sequence-trail .item-symbol-image { width: 84%; height: 84%; }
.sequence-trail .wheel-cell__seven, .sequence-trail .wheel-cell__double-star { font-size: 80%; }
.sequence-progress { margin-top: 1.5%; color: #e7bc72; font-size: clamp(5px, 1.4cqw, 9px); }
.special-award-popup { position: absolute; z-index: 6; top: 43%; left: 50%; max-width: 92%; margin: 0; padding: 2% 6%; overflow: hidden; transform: translate(-50%, -50%); border: 1px solid #ffe067; border-radius: 999px; background: rgb(113 17 8 / 96%); box-shadow: 0 0 14px rgb(255 199 48 / 62%); color: #fff1a3; font-size: clamp(6px, 1.7cqw, 12px); text-overflow: ellipsis; white-space: nowrap; animation: special-pop 520ms ease-out; }

.main-controls { position: absolute; z-index: 5; top: 70.15%; left: 0; width: 100%; height: 5.25%; }
.control { position: absolute; isolation: isolate; top: 0; overflow: hidden; width: 11.2%; height: 100%; padding: 0; cursor: pointer; border: max(2px, 0.45cqw) solid #f4c34e; border-radius: 50%; background: radial-gradient(circle at 36% 20%, #fff8c4 0 7%, #f5b84d 24%, #c4681f 67%, #67260b 100%); box-shadow: inset 0 0 0 max(1px, 0.22cqw) rgb(255 240 153 / 62%), inset 0 7px 8px rgb(255 255 255 / 34%), inset 0 -9px 9px rgb(63 12 3 / 52%), 0 4px 0 #3b1007, 0 7px 9px rgb(0 0 0 / 78%); color: #501407; font-size: clamp(8px, 2.35cqw, 17px); font-weight: 900; line-height: 0.9; text-shadow: -1px -1px #ffe89a, 1px -1px #ffe89a, -1px 1px #b76a1e, 1px 1px #b76a1e, 0 2px 2px rgb(54 10 3 / 42%); }
.control::before { position: absolute; z-index: 0; top: 8%; left: 18%; width: 64%; height: 31%; border-radius: 50%; background: linear-gradient(180deg, rgb(255 255 255 / 82%), rgb(255 255 255 / 8%)); content: ""; transform: rotate(-7deg); }
.control::after { position: absolute; z-index: 0; inset: 6%; border: max(1px, 0.2cqw) solid rgb(255 236 142 / 68%); border-radius: 50%; box-shadow: inset 0 -4px 5px rgb(85 18 3 / 32%); content: ""; }
.control > span, .control > small { position: relative; z-index: 1; }
.control:nth-child(1) { left: 11.62%; }
.control:nth-child(2) { left: 24.47%; }
.control:nth-child(3) { left: 37.44%; }
.control:nth-child(4) { left: 50.3%; }
.control:nth-child(5) { left: 63.26%; }
.control:nth-child(6) { left: 76.23%; }
.control small { display: block; margin-top: 8%; font-size: 72%; }
.control--small, .control--big { background: radial-gradient(circle at 36% 20%, #e0fff8 0 7%, #56ddc8 24%, #11a291 67%, #064e47 100%); }
.control--collect { background: radial-gradient(circle at 36% 20%, #fffbd1 0 7%, #ffd95c 24%, #e49a19 67%, #7a4207 100%); }
.control--start { background: radial-gradient(circle at 36% 20%, #ffe0bd 0 7%, #ff8b57 24%, #e93620 67%, #811109 100%); color: #fff1a8; font-size: clamp(13px, 4cqw, 29px); text-shadow: -1px -1px #7d150a, 1px -1px #7d150a, -1px 1px #7d150a, 1px 1px #7d150a, 0 3px 2px #5c0c06; }
.control--start span { display: block; }
.control:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 4px 7px rgb(49 8 2 / 42%), inset 0 -2px 3px rgb(255 244 179 / 22%), 0 1px 0 #3b1007, 0 3px 4px #000; }
.control.is-spinning { animation: pulse 320ms ease-in-out infinite alternate; }
.control:disabled { filter: saturate(0.62) brightness(0.76); opacity: 0.88; }

.bet-meters, .bet-buttons { position: absolute; z-index: 4; display: grid; grid-template-columns: repeat(8, 1fr); gap: 1.45%; width: 85.8%; }
.bet-meters { left: 6.1%; }
.bet-buttons { left: 6.5%; }
.bet-meters { top: 79.55%; height: 5.25%; }
.bet-meter { display: grid; place-items: center; color: #ff4a35; font-family: "Courier New", monospace; font-size: clamp(12px, 3.7cqw, 26px); font-weight: 700; letter-spacing: -0.08em; text-shadow: 0 0 5px #ff1e0b; }
.bet-buttons { top: 87.35%; height: 6.2%; }
.bet-button { position: relative; display: flex; width: 100%; height: auto; aspect-ratio: 1; align-self: start; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 0; cursor: pointer; border: 2px solid #dca837; border-radius: 50%; background: radial-gradient(circle at 40% 27%, color-mix(in srgb, var(--item-color), white 38%), var(--item-color) 67%, #133421); box-shadow: inset 0 3px 3px rgb(255 255 255 / 25%), 0 4px 0 #0e321f, 0 6px 8px #000; font-size: clamp(13px, 4.1cqw, 29px); line-height: 0.9; touch-action: manipulation; }
.bet-button > span { display: grid; width: 72%; height: 72%; place-items: center; }
.bet-button .item-symbol-image { width: 100%; height: 100%; }
.bet-button .wheel-cell__seven, .bet-button .wheel-cell__double-star { display: inline-block; }
.bet-button small { position: absolute; bottom: -25%; width: 100%; color: #ffe2a2; font-size: 48%; text-shadow: 0 1px #000; }
.bet-button.has-bet { border-color: #fff78f; filter: brightness(1.18) drop-shadow(0 0 5px #fff35d); transform: translateY(-4%); }
.bet-button:first-child span, .bet-button:nth-child(2) span { font-size: 68%; }

button:disabled { cursor: not-allowed; filter: saturate(0.2) brightness(0.58); opacity: 0.68; }
button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.toast { position: absolute; z-index: 8; top: 67.8%; left: 50%; max-width: 76%; padding: 1.2% 4%; transform: translate(-50%, 12%); border: 1px solid #e8b44e; border-radius: 999px; background: rgb(25 6 3 / 92%); color: #ffe494; font-size: clamp(7px, 2.1cqw, 14px); text-align: center; white-space: nowrap; opacity: 0; pointer-events: none; transition: 160ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.reset-button, .sound-button { position: absolute; z-index: 7; top: 2.1%; width: 8%; aspect-ratio: 1; padding: 0; cursor: pointer; border: 1px solid #d8a756; border-radius: 50%; background: rgb(45 12 7 / 78%); color: #ffe19a; font-size: clamp(13px, 4.7cqw, 32px); }
.reset-button { right: 4%; }
.sound-button { right: 13%; font-size: clamp(11px, 3.7cqw, 25px); }
.skill-button { position: absolute; z-index: 7; top: 2.4%; left: 4%; width: 12%; padding: 1.5% 0; cursor: pointer; border: 1px solid #d8a756; border-radius: 999px; background: linear-gradient(#7c2a16, #35100a); color: #ffe19a; font-size: clamp(7px, 2.4cqw, 16px); }
.skill-panel { position: absolute; z-index: 20; inset: 0; background: rgb(8 2 1 / 72%); }
.skill-panel__dialog { position: absolute; top: 18%; left: 12%; width: 76%; max-height: 68%; min-height: 56%; padding: 3.5%; overflow: auto; border: max(1px, 0.45cqw) solid #e0ac4b; border-radius: 3%; background: linear-gradient(145deg, #4c130c, #1b0705); box-shadow: 0 0 24px #000, inset 0 0 18px rgb(255 180 52 / 18%); color: #ffe5a5; }
.skill-panel__dialog header { display: flex; align-items: center; justify-content: space-between; font-size: clamp(13px, 4.4cqw, 30px); }
.skill-panel__dialog header button { width: 9%; aspect-ratio: 1; padding: 0; cursor: pointer; border: 1px solid #d69b3e; border-radius: 50%; background: #35100a; color: #ffe0a0; font-size: 100%; }
.skill-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 4% 0; overflow: hidden; border: 1px solid #dca744; border-radius: 999px; }
.skill-tabs button { padding: 3%; cursor: pointer; border: 0; background: #260b07; color: #c99f68; font-size: clamp(7px, 2.3cqw, 16px); }
.skill-tabs button.is-selected { background: linear-gradient(#ffd469, #ad4617); color: #4b1007; }
.skill-card { display: grid; grid-template-columns: 1fr auto; align-items: center; margin-top: 3%; padding: 3%; border: 1px solid rgb(255 201 90 / 48%); border-radius: 3%; background: rgb(31 7 4 / 75%); }
.skill-card div { display: flex; gap: 6%; align-items: baseline; }
.skill-card strong { font-size: clamp(9px, 2.8cqw, 19px); }
.skill-card small, .skill-card p, .skill-note, .skill-tab--empty p { color: #cda66f; font-size: clamp(6px, 1.7cqw, 12px); }
.skill-card p { grid-column: 1; margin: 3% 0; }
.skill-card output { grid-column: 1; color: #72f7ff; font-size: clamp(7px, 2cqw, 14px); }
.skill-card > button { grid-column: 2; grid-row: 1 / 4; min-width: 8.5em; padding: 10% 5%; cursor: pointer; border: 1px solid #ffe076; border-radius: 999px; background: linear-gradient(#ffcf54, #a74317); color: #4a1006; font-size: clamp(6px, 1.8cqw, 12px); }
.skill-card > button:disabled { cursor: not-allowed; }
.skill-note { margin: 4% 0 0; text-align: center; }
.skill-tab--empty { display: grid; min-height: 13em; place-content: center; text-align: center; }
.gameplay-unlock-list { display: grid; gap: 2%; }
.gameplay-unlock-item { padding: 2.5%; border: 1px solid rgb(255 201 90 / 35%); border-radius: 3%; background: rgb(31 7 4 / 78%); }
.gameplay-unlock-item.is-next { border-color: #ffe076; }
.gameplay-unlock-item.is-unlocked { border-color: #71c96b; background: rgb(31 83 35 / 58%); }
.gameplay-unlock-item div { display: flex; align-items: center; justify-content: space-between; }
.gameplay-unlock-item strong { font-size: clamp(8px, 2.35cqw, 16px); }
.gameplay-unlock-item small, .gameplay-unlock-item p, .gameplay-unlock-item output { color: #cda66f; font-size: clamp(5px, 1.45cqw, 10px); }
.gameplay-unlock-item.is-unlocked small { color: #9dff9a; }
.gameplay-unlock-item p { margin: 1.5% 0; }
.gameplay-unlock-item output { color: #72f7ff; }
.gameplay-unlock-button { position: sticky; bottom: 0; display: block; width: 56%; margin: 4% auto 0; padding: 3%; cursor: pointer; border: 1px solid #ffe076; border-radius: 999px; background: linear-gradient(#ffcf54, #a74317); box-shadow: 0 4px 18px #160403; color: #4a1006; font-size: clamp(7px, 1.9cqw, 13px); }
.skill-tab[hidden] { display: none; }

@keyframes pulse { from { filter: brightness(1); } to { filter: brightness(1.5) drop-shadow(0 0 8px #ffea65); } }
@keyframes jackpot-glow { from { filter: brightness(1); } to { filter: brightness(1.25); box-shadow: 0 0 70px #fff16b; } }
@keyframes jackpot-burst { from { transform: scale(0.94); filter: brightness(1); } to { transform: scale(1.08); filter: brightness(1.5); } }
@keyframes send-light { from { filter: brightness(1); } to { filter: brightness(1.28); } }
@keyframes special-pop { from { transform: translate(-50%, -50%) scale(0.7); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; } }
