:root { color-scheme: dark; font-family: Arial, Helvetica, sans-serif; background: #250407; }
* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; overflow-x: hidden; }
body { min-height: 100vh; min-height: 100svh; color: #fff; background: radial-gradient(circle at 50% 32%, #9b1b25 0, #500b0c 36%, #250407 74%, #110103 100%); }
button, a { -webkit-tap-highlight-color: transparent; }
.page { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; padding: max(8px, env(safe-area-inset-top)) 2px max(18px, env(safe-area-inset-bottom)); overflow: hidden; }
.page::before { content: ""; position: fixed; z-index: -2; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, rgba(255,211,78,.05) 0 2px, transparent 2px 78px), linear-gradient(rgba(255,181,32,.03), rgba(0,0,0,.25)); }
.lights { position: fixed; z-index: -1; inset: 0; opacity: .7; background-image: radial-gradient(circle, #ffd84f 0 2px, transparent 3px), radial-gradient(circle, #fff 0 1px, transparent 2px); background-size: 86px 86px, 137px 137px; background-position: 12px 24px, 47px 11px; }
.logo { position: relative; z-index: 8; display: block; width: min(430px, 53vw); height: auto; margin: -38px auto -20px; filter: drop-shadow(0 9px 9px rgba(30,0,2,.65)); }
.game { position: relative; z-index: 2; width: min(1060px, 100%); display: flex; flex-direction: column; align-items: center; }
.game h1 { position: relative; z-index: 8; margin: 0 0 3px; color: #fff4bc; font-size: clamp(25px, 4vw, 43px); line-height: 1; text-align: center; text-shadow: 0 4px 2px #69000b, 0 0 12px #ffb219; }
.stage { position: relative; width: min(800px, 100vw); aspect-ratio: 1; }
.wheel-wrap { position: absolute; z-index: 3; width: 86%; aspect-ratio: 1; top: 5%; left: 7%; filter: drop-shadow(0 15px 18px rgba(20,0,2,.7)); }
.rotor { position: absolute; z-index: 1; inset: 7.4%; overflow: hidden; border-radius: 50%; transform: rotate(0deg); -webkit-transform: rotate(0deg); will-change: transform; }
.rotor img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.wheel-base { z-index: 0; }
.wheel-labels { z-index: 1; }
.wheel-frame { position: absolute; z-index: 2; inset: 0; border: clamp(12px, 2.2vw, 24px) solid #f4a800; border-radius: 50%; pointer-events: none; background: transparent; box-shadow: 0 0 0 7px #8b1607, inset 0 0 0 6px #fff1a0, 0 0 24px #ffb800, inset 0 0 27px rgba(59,0,4,.86); }
.wheel-frame::before { content: ""; position: absolute; inset: 1%; border: 4px solid #ffdc49; border-radius: 50%; box-shadow: 0 0 9px #fff; }
.wheel-frame::after { content: ""; position: absolute; inset: -1%; border: 3px dotted #fff1a0; border-radius: 50%; }
.pointer { position: absolute; z-index: 5; top: -1%; left: 43.5%; width: 13%; aspect-ratio: .8; border: 5px solid #ffe66c; border-radius: 48% 48% 55% 55%; background: linear-gradient(#ff3b47 0 45%, #a30014 46% 100%); box-shadow: 0 5px 0 #5c0008, 0 0 14px #fff09b; clip-path: polygon(0 0, 100% 0, 88% 62%, 50% 100%, 12% 62%); }
.spin { position: absolute; z-index: 6; width: 24%; aspect-ratio: 1; top: 38%; left: 38%; border: 6px solid #fff1a0; border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 28%, #ff454e, #a90016 58%, #560008 100%); box-shadow: 0 0 0 7px #efa008, 0 7px 0 #6e1006, 0 0 23px #ffd63f; font: 900 clamp(16px, 2.8vw, 29px)/1 Arial, sans-serif; text-shadow: 0 3px 2px #520008; cursor: pointer; animation: pulse 1.4s ease-in-out infinite; }
.spin:disabled { cursor: default; animation: none; opacity: .98; }
.spin:focus-visible, .claim:focus-visible, .close:focus-visible { outline: 4px solid #fff; outline-offset: 4px; }
.prize { position: absolute; z-index: 4; width: 18%; height: auto; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(25,0,2,.65)); }
.prize-1 { left: -2%; bottom: 5%; transform: rotate(-13deg); }
.prize-2 { left: 10%; bottom: -2%; transform: rotate(9deg); }
.prize-3 { right: 10%; bottom: -2%; transform: rotate(-8deg); }
.prize-4 { right: -2%; bottom: 5%; transform: rotate(14deg); }
.modal[hidden] { display: none; }
.modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 14px; background: rgba(37,0,4,.9); backdrop-filter: blur(6px); }
.modal-card { position: relative; width: min(520px, 95vw); max-height: calc(100vh - 28px); max-height: calc(100svh - 28px); padding: 27px 25px 31px; overflow-y: auto; overscroll-behavior: contain; text-align: center; border: 4px solid #ffe368; border-radius: 30px; color: #fff; background: radial-gradient(circle at 50% 22%, #c42630, #74000c 55%, #3b0006); box-shadow: 0 0 0 7px #e89a08, 0 18px 70px rgba(28,0,3,.8), inset 0 0 35px rgba(255,206,38,.2); }
.win-art { display: block; width: min(84vw, 445px); max-width: 100%; max-height: min(23vh, 175px); max-height: min(23svh, 175px); height: auto; object-fit: contain; margin: 0 auto 1px; }
.modal h2 { margin: 3px 0 7px; color: #fff1a0; font-size: clamp(24px, 7vw, 39px); text-shadow: 0 3px 2px #69000b; }
.modal p { margin: 0; font-size: 20px; font-weight: 900; }
.result { display: block; margin: 4px 0 18px; color: #ffe86d; font-size: clamp(31px, 9vw, 47px); text-shadow: 0 3px 2px #69000b; }
.claim { display: inline-flex; justify-content: center; align-items: center; min-width: 230px; min-height: 60px; padding: 13px 30px; border: 3px solid #fff1a0; border-radius: 999px; color: #500008; background: linear-gradient(#fff283, #ffc928 58%, #e88a06); box-shadow: 0 5px 0 #761005, 0 8px 22px rgba(30,0,3,.5); text-decoration: none; font-size: 25px; font-weight: 900; }
.close { position: absolute; z-index: 3; top: 7px; right: 11px; border: 0; color: #fff; background: transparent; font: 700 38px/1 Arial, sans-serif; cursor: pointer; }
@keyframes pulse { 50% { transform: scale(1.06); filter: brightness(1.12) drop-shadow(0 0 12px #ffe26c); } }
@media (max-width: 640px) {
  .logo { width: min(390px, 66vw); margin-top: -30px; margin-bottom: -12px; }
  .stage { width: min(680px, 100vw); }
  .wheel-wrap { width: 94%; top: 2%; left: 3%; }
  .prize { width: 16%; bottom: 1%; }
  .modal { padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); }
  .modal-card { width: calc(100vw - 20px); max-width: 460px; max-height: calc(100vh - 20px); max-height: calc(100svh - 20px); padding: 23px 17px 25px; }
}
@media (max-width: 360px), (max-height: 620px) {
  .win-art { max-height: 18vh; max-height: 18svh; }
  .modal h2 { font-size: clamp(22px, 7vw, 30px); }
  .result { margin-bottom: 13px; font-size: clamp(28px, 9vw, 37px); }
  .claim { min-height: 52px; padding-block: 9px; }
}
@media (max-height: 720px) and (orientation: landscape) { .logo { width: 330px; margin-block: -44px -22px; } .game h1 { font-size: 22px; } .stage { width: min(520px, 78vh); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
