@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/open-sans-800-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 800;
  background: #05203b;
  color: #fff;
  --wheel-size: min(50svh, 480px, calc(100vw - 46px));
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-width: 280px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #fff7ba; outline-offset: 7px; }
button:disabled { cursor: default; }
img, svg { display: block; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.landing {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #05203b url("../assets/images/ice-lake.png") center center / cover no-repeat;
}

.landing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 28%, #03182d40 72%, #020d245c);
}

.snow {
  position: absolute;
  inset: -40% 0 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
  opacity: .8;
}

.snow::before, .snow::after {
  content: "";
  position: absolute;
  inset: -200px 0 0;
  background-image: radial-gradient(circle, #eaffff 1.2px, transparent 2px), radial-gradient(circle, #c8f2ffb3 1px, transparent 2px), radial-gradient(circle, #ffffffb0 1.5px, transparent 3px);
  background-size: 203px 209px, 307px 331px, 457px 463px;
  background-position: 15px 5px, 83px 119px, 167px 72px;
  animation: snowfall 20s linear infinite;
}

.snow::after {
  opacity: .4;
  transform: scale(1.3);
  animation-duration: 31s;
  animation-delay: -14s;
}

.stage {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px 22px 36px;
}

.wheel-screen, .win-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  z-index: 3;
}

.brand {
  position: relative;
  z-index: 6;
  width: min(206px, 23svh);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  margin-bottom: -13px;
  filter: drop-shadow(0 5px 2px #001a34b3) drop-shadow(0 0 14px #7cdfff45);
  user-select: none;
}

.wheel-shell {
  position: relative;
  width: var(--wheel-size);
  aspect-ratio: 1;
  z-index: 4;
  margin-top: 0;
  margin-bottom: 36px;
  filter: drop-shadow(0 15px 20px #00132cb0);
}

.wheel-aura {
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 49%, #65d6ff1f 57%, #90edff50 60%, #30bdff0d 65%, transparent 72%);
  animation: frost-breathe 3s ease-in-out infinite;
  pointer-events: none;
}

.wheel-frame, .wheel-spinner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wheel-frame { z-index: 1; overflow: visible; }
.wheel-spinner { z-index: 2; animation: idle-wheel 4s ease-in-out infinite; transform: rotate(-44deg); }
.wheel-face { width: 100%; height: 100%; overflow: visible; }
.wheel-rivets { filter: drop-shadow(0 1px 1px #001226); }
.frost-shard { opacity: .9; }

.sector { stroke: #d8f9ff; stroke-width: 2.8; }
.sector--jackpot { fill: url(#sector-jackpot); }
.sector-label {
  fill: #f2fdff;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 29px;
  font-weight: 800;
  text-anchor: middle;
  paint-order: stroke fill;
  stroke: #042a4b;
  stroke-width: 2.1px;
  stroke-linejoin: round;
  letter-spacing: -.6px;
}
.sector-label--light { fill: #06314e; stroke: #d1f7ff; stroke-width: 1px; }
.sector-label--jackpot { fill: #fff8bf; stroke: #03466a; stroke-width: 2.7px; }
.sector-label .small-line { font-size: 23px; }
.sector-label .retry-line { font-size: 20px; letter-spacing: -.3px; }

.wheel-pointer {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: -1.8%;
  width: 11.7%;
  height: 16%;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 2px #00182abf);
  transform-origin: 50% 10%;
}

.wheel-hub {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 23.5%;
  height: 23.5%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  padding: 11%;
  background: radial-gradient(circle at 34% 25%, #dbf9ff 0%, #6bd6fa 10%, #1576a0 24%, #064566 57%, #03253e 69%, #c6f8ff 71%, #4a94af 75%, #ecffff 78%, #668ca1 82%, #0c314b 88%);
  box-shadow: 0 4px 5px #001c3eb3, inset 0 0 0 2px #05283d;
}

.wheel-hub svg { position: absolute; width: 45%; height: 61%; top: 19%; left: 29%; filter: drop-shadow(0 2px 1px #001b2c); }

.ice-button {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 63px;
  min-width: 238px;
  max-width: calc(100vw - 48px);
  padding: 8px 30px 11px;
  z-index: 6;
  border: 3px solid #d3fbff;
  border-radius: 9px;
  background: linear-gradient(180deg, #80f1ff 0, #14b4e7 10%, #0878b6 48%, #034a7b 51%, #087bb0 90%, #1ba1c5);
  color: #fff;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px #2f95bd, inset 0 0 0 4px #b9efff55, 0 5px 0 #123e5d, 0 7px 0 #abc9db, 0 11px 15px #0016319c, 0 0 22px #66cfff25;
  transition: filter .2s, opacity .2s, box-shadow .2s;
  text-shadow: 0 2px 0 #002b4d, 1px 0 0 #003253, -1px 0 0 #003253;
  font-size: 29px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.ice-button::before, .ice-button::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 50%;
  background: #b8f5ff;
  box-shadow: 0 0 4px #e1ffff;
  opacity: .8;
}
.ice-button::before { left: 7px; }
.ice-button::after { right: 7px; }
.ice-button:hover:not(:disabled) { filter: brightness(1.18); }
.ice-button:active:not(:disabled) { transform: translateY(3px); }
.ice-button:disabled { opacity: .78; filter: saturate(.45); animation: none; }
.ice-button--spin { animation: button-pulse 2s ease-in-out infinite; }
.ice-button--claim { min-width: 280px; font-size: 27px; }

.fish-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.fish {
  position: absolute;
  width: clamp(120px, 18.5vw, 249px);
  aspect-ratio: 1;
  filter: drop-shadow(0 8px 7px #001834bd);
  animation: fish-float 4s ease-in-out infinite;
}
.fish::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/images/fish-sprite.png") 0 50% / 300% 100% no-repeat;
}
.fish--gold::before { background-position-x: 0%; }
.fish--red::before { background-position-x: 50%; }
.fish--blue::before { background-position-x: 100%; }
.fish--left::before { transform: scaleX(-1); }
.fish--1 { left: calc(50% - 525px); top: calc(50% - 324px); transform: rotate(-13deg); }
.fish--2 { left: calc(50% - 576px); top: calc(50% - 92px); animation-delay: -1.2s; }
.fish--3 { left: calc(50% - 490px); top: calc(50% + 139px); animation-delay: -2.3s; }
.fish--4 { right: calc(50% - 520px); top: calc(50% - 322px); animation-delay: -.4s; }
.fish--5 { right: calc(50% - 574px); top: calc(50% - 92px); animation-delay: -2.7s; }
.fish--6 { right: calc(50% - 490px); top: calc(50% + 139px); animation-delay: -1.8s; }

.win-screen { text-align: center; animation: result-appear .6s ease-out both; }
.win-screen .brand { margin-bottom: 4px; width: min(211px, 24svh); }
.win-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2px 0 19px;
  padding: 0 10px 12px;
  transform: rotate(-7deg);
  animation: win-float 3s ease-in-out infinite;
}
.win-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 480px;
  height: 480px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #dcfaff88 0, #75ddff77 18%, #26d3f52b 40%, transparent 70%);
  pointer-events: none;
}
.win-art__top, .win-art__bottom {
  display: block;
  width: 100%;
  position: relative;
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -4px;
  line-height: 1.03;
  -webkit-text-stroke: 2px #e1fcff;
  paint-order: stroke fill;
}
.win-art__top {
  font-size: clamp(58px, 7.6svh, 76px);
  color: #a4edff;
  text-shadow: 0 3px #1974a3, 0 5px #075e91, 0 8px #003353, 3px 10px #001e3e, -3px 5px #002b51;
}
.win-art__bottom {
  font-size: clamp(72px, 9.9svh, 100px);
  color: #ffdb57;
  -webkit-text-stroke-color: #fff6b6;
  text-shadow: 0 3px #f49605, 0 6px #cf6505, 0 9px #8c3a06, 0 13px #003351, 4px 15px #00243d, -3px 9px #00304a;
}

.win-copy { position: relative; z-index: 4; margin: 12px 0 31px; }
.win-amount {
  margin: 0 0 7px;
  color: #fff1a2;
  font-size: clamp(28px, 3.9vw, 43px);
  line-height: 1.28;
  letter-spacing: -.9px;
  text-shadow: 0 2px 0 #023552, 0 4px 6px #002638, 0 0 18px #3bb6e3;
}
.win-amount:focus { outline: none; }
.win-label { margin: 0; color: #d8f9ff; font-size: 30px; line-height: 1.3; text-shadow: 0 3px 1px #022f4d; }
.win-screen .ice-button { margin-top: 6px; }

.sound-toggle {
  position: absolute;
  right: max(17px, env(safe-area-inset-right));
  top: max(17px, env(safe-area-inset-top));
  z-index: 20;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid #d3f7ff50;
  border-radius: 50%;
  background: #052b4599;
  color: #d8f9ff;
  cursor: pointer;
  opacity: .75;
}
.sound-toggle:hover { opacity: 1; }
.sound-toggle svg { width: 20px; height: 20px; }
.sound-toggle .sound-off { display: none; }
.sound-toggle[aria-pressed="false"] .sound-off { display: block; }
.sound-toggle[aria-pressed="false"] .sound-on { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.noscript-message { position: relative; z-index: 30; margin: 0; padding: 16px; background: #052b49; color: #fff; text-align: center; font-size: 14px; }

.is-spinning .wheel-spinner { animation: prize-spin 3s cubic-bezier(.16, .47, .19, 1) forwards; }
.is-spinning .wheel-pointer { animation: pointer-tick .14s ease-in-out 20; }
.is-winner .sector--jackpot { stroke: #fff1ad; stroke-width: 5px; filter: brightness(1.27); }
.is-winner .wheel-aura { animation: winner-glow .8s ease-in-out infinite alternate; }
.is-winner .ice-button--spin { opacity: 0; pointer-events: none; }
.is-result .fish { animation-duration: 4.6s; }

@keyframes idle-wheel { 0%,100% { transform: rotate(-40deg); } 50% { transform: rotate(-52deg); } }
@keyframes prize-spin { from { transform: rotate(-44deg); } to { transform: rotate(1080deg); } }
@keyframes pointer-tick { 0%,100% { transform: translateX(-50%) rotate(0); } 45% { transform: translateX(-50%) rotate(-9deg); } }
@keyframes frost-breathe { 0%,100% { opacity: .65; transform: scale(.99); } 50% { opacity: 1; transform: scale(1.02); } }
@keyframes button-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes fish-float { 0%,100% { translate: 0 0; rotate: -5deg; } 50% { translate: 0 -11px; rotate: 3deg; } }
@keyframes win-float { 0%,100% { transform: rotate(-7deg) scale(1); } 50% { transform: rotate(-5deg) scale(1.025); } }
@keyframes snowfall { to { translate: 20px 330px; } }
@keyframes winner-glow { from { filter: brightness(1); opacity: .7; } to { filter: brightness(1.7); opacity: 1; } }
@keyframes result-appear { from { opacity: 0; transform: scale(.91); } to { opacity: 1; transform: scale(1); } }

@media (min-width: 1600px) {
  :root { --wheel-size: min(51svh, 580px); }
  .brand { width: 235px; }
  .fish { width: 285px; }
  .fish--1, .fish--3 { left: calc(50% - 660px); }
  .fish--2 { left: calc(50% - 705px); }
  .fish--4, .fish--6 { right: calc(50% - 660px); }
  .fish--5 { right: calc(50% - 705px); }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .fish { width: 20vw; }
  .fish--1, .fish--3 { left: 3%; }
  .fish--2 { left: -1%; }
  .fish--4, .fish--6 { right: 3%; }
  .fish--5 { right: -1%; }
}

@media (max-width: 700px) {
  :root { --wheel-size: min(91vw, 420px, calc(100svh - 300px)); }
  .landing { background-position: 50% 50%; }
  .stage { padding: max(14px, env(safe-area-inset-top)) 12px max(20px, env(safe-area-inset-bottom)); }
  .wheel-screen { min-height: calc(100svh - 34px); justify-content: flex-start; }
  .brand { width: min(51vw, 205px, 24svh); margin-bottom: -8px; }
  .wheel-shell { margin-bottom: 21px; flex: 0 0 auto; }
  .ice-button { min-height: 58px; min-width: 224px; font-size: 26px; padding: 9px 27px 12px; }
  .ice-button--spin { margin-top: auto; margin-bottom: max(42px, 7svh); }
  .fish { width: min(37vw, 160px); opacity: .97; }
  .fish--1 { left: -8vw; top: 18svh; }
  .fish--2 { left: auto; right: -10vw; top: 38svh; }
  .fish--3 { left: 1vw; top: 64svh; }
  .fish--4, .fish--5, .fish--6 { display: none; }
  .win-screen { min-height: calc(100svh - 34px); justify-content: center; padding-bottom: 32px; }
  .win-screen .brand { width: min(53vw, 206px, 25svh); margin-bottom: 14px; }
  .win-art { margin-bottom: 14px; }
  .win-art__top { font-size: min(15vw, 65px); letter-spacing: -3px; }
  .win-art__bottom { font-size: min(19.8vw, 83px); letter-spacing: -3.4px; }
  .win-art::before { width: 110vw; height: 110vw; max-width: 470px; max-height: 470px; }
  .win-copy { margin-top: 21px; margin-bottom: 23px; }
  .win-amount { font-size: clamp(25px, 7.4vw, 35px); letter-spacing: -.7px; }
  .win-label { font-size: 27px; }
  .ice-button--claim { font-size: 24px; min-width: 270px; }
  .is-result .fish-scene { display: none; }
  .sound-toggle { width: 33px; height: 33px; right: 13px; top: 13px; }
}

@media (max-width: 700px) and (max-height: 700px) {
  :root { --wheel-size: min(88vw, calc(100svh - 240px)); }
  .brand { width: min(43vw, 155px, 23svh); }
  .wheel-shell { margin-bottom: 15px; }
  .ice-button--spin { margin-bottom: 31px; min-height: 52px; }
  .fish--3 { top: 62svh; }
  .win-screen { padding-bottom: 22px; }
  .win-screen .brand { width: min(43vw, 155px, 23svh); margin-bottom: 5px; }
  .win-art { margin: 0 0 10px; }
  .win-art__top { font-size: min(14vw, 8.5svh); }
  .win-art__bottom { font-size: min(18.5vw, 11svh); }
  .win-copy { margin: 14px 0 18px; }
  .win-label { font-size: 24px; }
  .ice-button--claim { min-height: 54px; }
}

@media (max-height: 540px) and (min-width: 701px) {
  :root { --wheel-size: 57svh; }
  .stage { padding: 10px 20px 20px; }
  .brand { width: 21svh; margin-bottom: -9px; }
  .wheel-shell { margin-bottom: 13px; }
  .ice-button { min-height: 45px; min-width: 210px; font-size: 23px; padding: 5px 25px 8px; }
  .win-screen .brand { width: 23svh; }
  .win-art { margin: 0 0 7px; padding-bottom: 4px; }
  .win-art__top { font-size: 10svh; }
  .win-art__bottom { font-size: 13svh; }
  .win-copy { margin: 12px 0 10px; }
  .win-amount { font-size: 6.7svh; }
  .win-label { font-size: 5.3svh; }
  .fish { width: 22svh; }
  .fish--1, .fish--4 { top: 8svh; }
  .fish--2, .fish--5 { top: 38svh; }
  .fish--3, .fish--6 { top: 66svh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .is-spinning .wheel-spinner, .is-winner .wheel-spinner { transform: rotate(1080deg); }
}
