* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #07080e;
  color: #f4f2ff;
  font-synthesis: none;
  --purple: #a76bff;
  --space-background: none;
}
body {
  margin: 0;
  min-width: 320px;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button:focus-visible {
  outline: 2px solid #d2b9ff;
  outline-offset: 5px;
}
button:active:not(:disabled) {
  transform: scale(0.95);
}
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button svg {
  width: 24px;
  height: 24px;
}
button {
  transition:
    background 0.2s,
    opacity 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}
.space {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(
      90deg,
      rgba(4, 5, 12, 0.23),
      rgba(4, 5, 12, 0.03),
      rgba(4, 5, 12, 0.23)
    ),
    var(--space-background);
  background-size: cover;
  background-position: center 48%;
  z-index: -3;
}
.space:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#06071040, transparent 30%, #05060baa);
}
.energy-wash {
  position: fixed;
  inset: 0;
  background: #050312;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  z-index: -1;
}
.anticipation .energy-wash {
  opacity: 0.5;
}
.free-mode .space {
  filter: saturate(1.3) brightness(1.15);
}
#app {
  min-height: 100svh;
  padding: env(safe-area-inset-top) max(22px, env(safe-area-inset-right))
    env(safe-area-inset-bottom) max(22px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 86px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #d3ceff16;
  max-width: 1440px;
  width: 100%;
  margin: auto auto 0;
}
.icon-button {
  width: 44px;
  height: 44px;
  background: #14141d99;
  border: 1px solid #b9c0ef26;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.icon-button:hover {
  background: #34303e;
}
.wordmark {
  font-size: 20px;
  letter-spacing: 4px;
  font-weight: 800;
}
.wordmark span {
  display: block;
  font-size: 10px;
  letter-spacing: 5.5px;
  margin-top: 4px;
  font-weight: 400;
  color: #b8b7ca;
}
.top-balance {
  margin-left: auto;
  text-align: right;
  display: grid;
  gap: 5px;
}
.top-balance strong {
  font-size: 19px;
}
.label {
  font-size: 12px;
  letter-spacing: 1.9px;
  color: #a8a7bd;
  font-weight: 500;
}
.game {
  width: min(960px, 100%);
  margin: auto;
  position: relative;
  padding-top: 32px;
}
.title-area {
  text-align: center;
  margin-bottom: 27px;
}
.eyebrow {
  color: #c3b0e0;
  font-size: 11px;
  letter-spacing: 3.8px;
}
.title-area h1 {
  font-size: clamp(34px, 5.7vw, 63px);
  font-weight: 300;
  letter-spacing: 9px;
  margin: 8px 0 7px;
  line-height: 1.2;
  text-shadow: 0 4px 18px #000;
}
.title-area h1 b {
  font-weight: 800;
  color: #eee7ff;
}
.title-rule {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}
.title-rule span {
  font-size: 10px;
  letter-spacing: 4px;
  color: #c8c1d6;
}
.title-rule i {
  height: 1px;
  background: #a594b74d;
  width: 52px;
}
.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 12px;
  color: #b9b4ca;
  font-size: 11px;
  letter-spacing: 2px;
  min-height: 26px;
}
#free-status {
  color: #ceb0ff;
}
#multiplier {
  color: #c6a6f8;
}
.machine {
  padding: 12px;
  border: 1px solid #a182dd85;
  border-radius: 14px;
  background: linear-gradient(
    150deg,
    #383746b3,
    #0e0e18ed 17%,
    #101019eb 82%,
    #37323fb0
  );
  box-shadow:
    0 0 0 5px #0709109c,
    0 0 0 6px #918aa22b,
    0 16px 55px #000b,
    inset 0 1px 1px #eeeeff26;
  position: relative;
}
.frame-top {
  position: absolute;
  display: flex;
  gap: 5px;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
}
.frame-top i {
  width: 30px;
  height: 3px;
  background: #b88aff;
  box-shadow: 0 0 8px #a669ff;
}
.frame-top i:nth-child(2) {
  width: 60px;
}
.frame-bottom {
  position: absolute;
  bottom: 3px;
  left: 40%;
  width: 20%;
  height: 1px;
  background: #a77cefa6;
}
#reels {
  display: grid;
  grid-template-columns: repeat(var(--reels), 1fr);
  gap: 1px;
  background: #50495b40;
  border: 1px solid #242431;
  border-radius: 7px;
  overflow: hidden;
  height: clamp(260px, 33vw, 378px);
}
.reel {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
  background: linear-gradient(#0a0b15ee, #151320cd, #080a13ed);
}
.reel:after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow:
    inset 0 15px 18px -16px #000,
    inset 0 -15px 18px -16px #000;
  pointer-events: none;
}
.strip {
  height: 100%;
  will-change: transform;
}
.symbol {
  height: calc(100% / var(--rows));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.3s,
    background 0.3s;
}
.symbol img {
  width: 90%;
  height: 96%;
  object-fit: contain;
  user-select: none;
  position: relative;
  z-index: 1;
}
.has-win .symbol:not(.winner) {
  opacity: 0.35;
}
.symbol.winner {
  background: radial-gradient(ellipse, #9566b330, transparent 70%);
}
.symbol.winner:before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid #d2b6ff90;
  border-radius: 8px;
  box-shadow:
    inset 0 0 15px #a663ff22,
    0 0 12px #a663ff25;
  animation: win-pulse 1.3s ease-in-out infinite;
}
.symbol.wild-win:after {
  content: "";
  position: absolute;
  width: 88%;
  height: 45%;
  border: 2px solid #d8b5ff;
  border-radius: 50%;
  transform: rotate(-25deg);
  box-shadow: 0 0 14px #a67aff;
  animation: orbit 1.4s ease-in-out infinite;
  z-index: 2;
}
.wild-win img {
  animation: flare 1.3s ease-in-out infinite;
}
.anticipation .symbol[data-symbol="scatter"] img {
  filter: drop-shadow(0 0 10px #5bbaff);
  animation: flare 0.7s infinite;
}
.free-mode .machine {
  border-color: #b28fff;
  box-shadow:
    0 0 0 5px #0709109c,
    0 0 30px #9759ff25,
    0 16px 55px #000b;
}
#line-overlay {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  pointer-events: none;
  z-index: 3;
}
#line-overlay polyline {
  stroke: #e5d0ff;
  stroke-width: 1.3;
  stroke-dasharray: 5 4;
  filter: drop-shadow(0 0 3px #c291ff);
  opacity: 0;
  animation: line-show 2.5s infinite;
}
.message-bar {
  height: 51px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #c6bad8;
  font-size: 14px;
  letter-spacing: 0.4px;
}
.control-deck {
  background: #0c0d15e8;
  border: 1px solid #a19db528;
  border-radius: 15px;
  box-shadow: 0 12px 30px #0007;
  padding: 18px 26px 15px;
  backdrop-filter: blur(18px);
}
.meters {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: start;
  text-align: center;
}
.meter {
  display: grid;
  gap: 8px;
}
.meter > strong {
  font-size: 24px;
  line-height: 44px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}
.win-meter strong {
  color: #decbff;
}
.balance-meter {
  border-right: 1px solid #aaa3c41b;
}
.win-meter {
  border-left: 1px solid #aaa3c41b;
}
.bet-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 44px;
}
.bet-controls button {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #191923;
  border: 1px solid #aca1c92e;
  font-size: 22px;
  color: #d5c5eb;
}
.bet-controls strong {
  min-width: 82px;
  font-size: 23px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding-top: 10px;
}
.actions > .icon-button:first-child {
  margin-right: auto;
}
.actions > .icon-button:last-child {
  margin-left: auto;
}
.mode-button {
  background: transparent;
  border: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 52px;
  min-height: 52px;
  color: #a2a0b6;
  font-size: 11px;
  letter-spacing: 1.5px;
}
.mode-button[aria-pressed="true"] {
  color: #d5b4ff;
}
.mode-button[aria-pressed="true"] svg {
  filter: drop-shadow(0 0 6px #a876ff);
}
#spin {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid #d1adff;
  background: linear-gradient(155deg, #b380ff, #7335c8 77%);
  box-shadow:
    0 0 0 5px #a171db13,
    0 0 0 6px #ba91f747,
    inset 0 1px 4px #e4cbff99,
    0 6px 22px #8547cf38;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-shrink: 0;
}
#spin svg {
  width: 42px;
  height: 42px;
  stroke-width: 2.5;
}
#spin span {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
}
#spin:hover:not(:disabled) {
  box-shadow:
    0 0 0 5px #a171db13,
    0 0 0 6px #ba91f799,
    0 0 35px #8547cf66;
}
#spin.working {
  opacity: 0.8;
}
#spin.working svg {
  animation: rotate 1s linear infinite;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 0 24px;
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #848195;
}
#particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}
#particles i {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #f3dfff;
  border-radius: 50%;
  box-shadow: 0 0 7px #bd87ff;
}
.celebration {
  position: fixed;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
  text-align: center;
  min-width: 280px;
  text-shadow:
    0 3px 14px #10071f,
    0 0 25px #a47aff;
}
.celebration span {
  display: block;
  letter-spacing: 6px;
  font-size: 25px;
  font-weight: 800;
  color: #e1c9ff;
}
.celebration strong {
  font-size: 48px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
#vortex {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: grid;
  place-items: center;
  background: #05030d80;
  overflow: hidden;
}
#vortex[hidden],
.celebration[hidden] {
  display: none;
}
#vortex > img {
  position: absolute;
  width: min(75vw, 650px);
  height: min(75vw, 650px);
  object-fit: contain;
  opacity: 0.65;
  animation: portal-expand 1.8s ease-in forwards;
}
#vortex > div {
  position: relative;
  text-align: center;
  text-shadow: 0 2px 20px #000;
}
#vortex span {
  display: block;
  letter-spacing: 5px;
  font-size: 12px;
}
#vortex strong {
  display: block;
  font-size: clamp(30px, 8vw, 65px);
  letter-spacing: 4px;
  margin-top: 15px;
}
#vortex b {
  font-size: 84px;
}
dialog {
  background: #11121e;
  color: #e9e7f5;
  border: 1px solid #79648680;
  border-radius: 20px;
  width: min(680px, calc(100% - 28px));
  max-height: 85svh;
  padding: 28px;
  box-shadow: 0 25px 100px #000b;
}
dialog::backdrop {
  background: #03040dc9;
  backdrop-filter: blur(10px);
}
dialog h2 {
  font-size: 28px;
  margin: 8px 0 15px;
}
dialog h3 {
  margin-top: 28px;
}
dialog p {
  font-size: 15px;
  line-height: 1.7;
  color: #ccc6d8;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.muted {
  color: #928ca6 !important;
}
.paytable > div {
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid #ffffff12;
  padding: 9px 0;
}
.paytable img {
  width: 65px;
  height: 65px;
  object-fit: contain;
}
.paytable section {
  display: grid;
  gap: 8px;
  font-size: 14px;
}
.paytable section span {
  color: #bcb0d4;
  font-size: 13px;
}
.line-guide {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}
.line-guide > div {
  border: 1px solid #ffffff17;
  border-radius: 7px;
  padding: 6px;
}
.line-guide span {
  font-size: 11px;
  color: #aaa0bf;
}
.line-guide svg {
  width: 100%;
  stroke: #b689ff;
  stroke-width: 2;
}
.primary {
  background: #8953d0;
  border: 1px solid #c296ff;
  border-radius: 10px;
  padding: 14px 24px;
  width: 100%;
}
.lab {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: #101322f5;
  border: 1px solid #86719e;
  padding: 10px;
  border-radius: 10px;
  z-index: 8;
  max-width: calc(100vw - 20px);
  font-size: 12px;
}
.lab select,
.lab button {
  padding: 9px;
  background: #2b233a;
  border: 1px solid #776780;
  color: white;
  border-radius: 5px;
}
.lab summary {
  cursor: pointer;
  padding: 5px;
}
.lab pre {
  white-space: pre-wrap;
  max-height: 160px;
  overflow: auto;
}
.lab details > div {
  display: flex;
  gap: 6px;
}
@keyframes win-pulse {
  50% {
    opacity: 0.4;
  }
}
@keyframes flare {
  50% {
    filter: drop-shadow(0 0 9px #b783ff) brightness(1.2);
  }
}
@keyframes orbit {
  50% {
    transform: rotate(25deg) scale(1.05);
    opacity: 0.5;
  }
}
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}
@keyframes line-show {
  20%,
  55% {
    opacity: 0.65;
  }
  80% {
    opacity: 0;
  }
}
@keyframes portal-expand {
  0% {
    transform: scale(0.25) rotate(-30deg);
    opacity: 0;
  }
  40% {
    opacity: 0.8;
  }
  100% {
    transform: scale(4) rotate(40deg);
    opacity: 0;
  }
}
@media (min-width: 1400px) {
  .game {
    width: 1000px;
  }
  #reels {
    height: 390px;
  }
}
@media (max-width: 600px) {
  #app {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .topbar {
    height: 68px;
    gap: 11px;
    margin-top: 0;
  }
  .wordmark {
    font-size: 14px;
    letter-spacing: 2.4px;
  }
  .wordmark span {
    font-size: 8px;
    letter-spacing: 3.3px;
  }
  .top-balance strong {
    font-size: 16px;
  }
  .top-balance .label {
    font-size: 9px;
  }
  .topbar .icon-button {
    width: 36px;
    height: 36px;
  }
  .game {
    padding-top: 25px;
    margin: auto 0;
  }
  .title-area {
    margin-bottom: 28px;
  }
  .title-area h1 {
    font-size: 34px;
    letter-spacing: 4px;
    margin: 10px 0;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 2.6px;
  }
  .title-rule span {
    font-size: 8px;
    letter-spacing: 2.7px;
  }
  .title-rule i {
    width: 27px;
  }
  .game-meta {
    padding: 0 5px 11px;
    font-size: 9px;
    letter-spacing: 1.3px;
  }
  .machine {
    padding: 6px;
    border-radius: 10px;
    box-shadow:
      0 0 0 3px #0709109c,
      0 0 0 4px #918aa22b,
      0 16px 45px #0008;
  }
  #reels {
    height: clamp(238px, 67vw, 300px);
    border-radius: 5px;
  }
  .symbol img {
    width: 98%;
    height: 91%;
  }
  #line-overlay {
    inset: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
  }
  .message-bar {
    height: 47px;
    font-size: 12px;
    letter-spacing: 0;
  }
  .control-deck {
    padding: 15px 10px 17px;
    border-radius: 14px;
  }
  .label {
    font-size: 9px;
    letter-spacing: 1.3px;
  }
  .meter {
    gap: 5px;
  }
  .meter > strong {
    font-size: 18px;
    line-height: 40px;
  }
  .bet-controls {
    gap: 3px;
    height: 40px;
  }
  .bet-controls strong {
    font-size: 17px;
    min-width: 57px;
  }
  .bet-controls button {
    width: 29px;
    height: 40px;
    background: transparent;
    border: 0;
    font-size: 21px;
  }
  .meters {
    grid-template-columns: 1fr 1.25fr 1fr;
  }
  .actions {
    gap: 16px;
    padding-top: 16px;
  }
  .actions .icon-button {
    width: 36px;
    height: 44px;
    background: transparent;
    border: 0;
  }
  .actions svg {
    width: 23px;
    height: 23px;
  }
  .mode-button {
    font-size: 10px;
    min-width: 43px;
  }
  #spin {
    width: 88px;
    height: 88px;
  }
  #spin svg {
    width: 40px;
    height: 40px;
  }
  footer {
    padding: 18px 3px;
    font-size: 7px;
    letter-spacing: 1px;
  }
  footer span:last-child {
    display: none;
  }
  .celebration {
    top: 15%;
  }
  .celebration span {
    font-size: 22px;
  }
  .celebration strong {
    font-size: 35px;
  }
  dialog {
    padding: 20px;
  }
  .symbol.winner:before {
    inset: 2px;
  }
}
@media (max-width: 600px) and (max-height: 740px) {
  .game {
    padding-top: 14px;
  }
  .title-area {
    margin-bottom: 17px;
  }
  .title-area h1 {
    font-size: 30px;
    margin: 6px 0;
  }
  .title-rule {
    display: none;
  }
  .topbar {
    height: 58px;
  }
  #reels {
    height: 222px;
  }
  .message-bar {
    height: 36px;
  }
  .control-deck {
    padding-top: 11px;
    padding-bottom: 13px;
  }
  .actions {
    padding-top: 9px;
  }
  #spin {
    width: 76px;
    height: 76px;
  }
  footer {
    padding: 13px 2px;
  }
  .game-meta {
    padding-bottom: 9px;
  }
  .title-area .eyebrow {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wild-win img,
  .symbol:before,
  .symbol:after,
  #line-overlay polyline,
  .anticipation .symbol img {
    animation: none !important;
  }
  #vortex > img {
    animation: none;
    opacity: 0.5;
  }
  button {
    transition: none;
  }
}
.lab {
  top: 8px;
  bottom: auto;
}
.lab pre {
  max-height: 130px;
}
.celebration:before {
  content: "";
  position: absolute;
  inset: -15px -40px;
  background: linear-gradient(
    110deg,
    transparent 35%,
    #dac5ff30 49%,
    transparent 63%
  );
  animation: light-sweep 1.8s ease-out;
  pointer-events: none;
}
@keyframes light-sweep {
  from {
    transform: translateX(-60%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  to {
    transform: translateX(60%);
    opacity: 0;
  }
}

/* Keep the entire control deck in the shortest supported portrait viewport. */
@media (max-width: 600px) and (max-height: 740px) {
  .game {
    padding-top: 8px;
  }
  .title-area {
    margin-bottom: 12px;
  }
  footer {
    padding: 9px 2px;
  }
}
@media (max-width: 600px) {
  .bet-controls button {
    position: relative;
  }
  .bet-controls button::before {
    content: "";
    position: absolute;
    inset: -2px -8px;
  }
}
@media (min-width: 601px) {
  .game {
    padding-top: 20px;
  }
  .title-area {
    margin-bottom: 20px;
  }
  footer {
    padding: 16px 0 18px;
  }
}
@media (min-width: 601px) and (max-height: 950px) {
  .game {
    max-width: 860px;
    padding-top: 14px;
  }
  .title-area h1 {
    font-size: 48px;
  }
  .title-area {
    margin-bottom: 17px;
  }
  #reels {
    height: 330px;
  }
  .topbar {
    height: 72px;
  }
  .message-bar {
    height: 42px;
  }
}
