:root { color-scheme: dark; font-family: Arial, Helvetica, sans-serif; background: #070707; }
* { 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% 31%, #6e2710 0, #251006 43%, #070707 100%); }
button, a { -webkit-tap-highlight-color: transparent; }
.background-video { position: fixed; z-index: -3; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.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: -1; inset: 0; pointer-events: none; background: linear-gradient(rgba(255,173,18,.04), rgba(0,0,0,.23)); }
.logo { position: relative; z-index: 8; display: block; width: min(600px, 67vw); height: auto; margin: 3px auto -24px; filter: drop-shadow(0 9px 10px rgba(0,0,0,.75)); }
.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: #fff4aa; font-size: clamp(25px, 4vw, 43px); line-height: 1; text-align: center; text-shadow: 0 4px 2px #681600, 0 0 12px #ffad16; }
.stage { position: relative; width: min(800px, 100vw); aspect-ratio: 1; }
.wheel-wrap { position: absolute; z-index: 3; width: 87%; aspect-ratio: 1; top: 4%; left: 6.5%; filter: drop-shadow(0 15px 18px rgba(0,0,0,.72)); }
.rotor { position: absolute; z-index: 1; inset: 7.2%; 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 #e88a00; border-radius: 50%; pointer-events: none; background: transparent; box-shadow: 0 0 0 7px #6f1a00, inset 0 0 0 6px #fff49a, 0 0 25px #ffb800, inset 0 0 28px rgba(76,18,0,.8); }
.wheel-frame::before { content: ""; position: absolute; inset: 1%; border: 4px solid #ffd54b; border-radius: 50%; box-shadow: 0 0 9px #fff; }
.wheel-frame::after { content: ""; position: absolute; inset: -1%; border: 3px dotted #fff0a0; border-radius: 50%; }
.pointer { position: absolute; z-index: 5; top: -1%; left: 43.5%; width: 13%; aspect-ratio: .8; border: 5px solid #ffe76d; border-radius: 48% 48% 55% 55%; background: linear-gradient(#f04422 0 45%, #8f1800 46% 100%); box-shadow: 0 5px 0 #4d1000, 0 0 14px #fff0a0; 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 #fff19a; border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 28%, #fb4b27, #a12000 58%, #571000 100%); box-shadow: 0 0 0 7px #eba004, 0 7px 0 #651600, 0 0 23px #ffd33c; font: 900 clamp(16px, 2.8vw, 29px)/1 Arial, sans-serif; text-shadow: 0 3px 2px #4c0f00; 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; }
.person { position: absolute; z-index: 4; width: 24%; height: auto; left: -2%; bottom: 3%; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(0,0,0,.7)); }
.decor { position: absolute; z-index: 4; right: -2%; bottom: 1%; width: 24%; pointer-events: none; }
.decor img { display: block; width: 100%; height: auto; }
.play-hint { position: relative; z-index: 8; min-height: 30px; margin: -8% 0 0; color: #fff3a0; font-size: clamp(19px, 2.7vw, 27px); font-weight: 900; line-height: 1.2; text-align: center; text-shadow: 0 3px 2px #681600, 0 0 10px #ffad16; }
.modal[hidden] { display: none; }
.modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 14px; background: rgba(16,7,2,.91); backdrop-filter: blur(6px); }
.modal-card { position: relative; width: min(530px, 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% 20%, #b33a16, #5e1704 57%, #210900); box-shadow: 0 0 0 7px #e89a08, 0 18px 70px rgba(0,0,0,.82), inset 0 0 35px rgba(255,206,38,.2); }
.win-art { display: block; width: min(84vw, 460px); max-width: 100%; max-height: min(18vh, 125px); max-height: min(18svh, 125px); height: auto; object-fit: contain; margin: 0 auto 4px; }
.modal h2 { margin: 3px 0 7px; color: #fff1a0; font-size: clamp(24px, 7vw, 39px); text-shadow: 0 3px 2px #681600; }
.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 #681600; }
.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: #4c1000; background: linear-gradient(#fff283, #ffc928 58%, #e88a06); box-shadow: 0 5px 0 #681600, 0 8px 22px rgba(0,0,0,.55); 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(570px, 83vw); margin-top: 9px; margin-bottom: -18px; }
  .stage { width: min(680px, 100vw); }
  .wheel-wrap { width: 94%; top: 2%; left: 3%; }
  .person { width: 20%; left: -1%; bottom: 2%; }
  .decor { width: 33%; right: -1%; bottom: 1%; }
  .play-hint { margin-top: -7%; }
  .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: 15vh; max-height: 15svh; }
  .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: 460px; margin-block: 0 -31px; } .game h1 { font-size: 22px; } .stage { width: min(520px, 78vh); } .play-hint { margin-top: -8%; font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
