:root { color-scheme: dark; font-family: Arial, Helvetica, sans-serif; background: #6d0000; }
* { 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: #6d0000 url("assets/redHot100/img/page-bg.webp") center / cover fixed no-repeat; }
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(9px, 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; background: linear-gradient(rgba(255,186,24,.04), rgba(92,0,0,.16)); pointer-events: none; }
.logo { position: relative; z-index: 8; display: block; width: min(650px, 72vw); height: auto; margin: 12px auto 7px; filter: drop-shadow(0 6px 7px rgba(103,0,0,.55)); }
.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; color: #fff3a1; font-size: clamp(25px, 4vw, 43px); line-height: 1; text-align: center; text-shadow: 0 4px 2px #a00000, 0 0 10px #ffba20; }
.stage { position: relative; width: min(790px, 100vw); aspect-ratio: 1; margin-top: 1px; }
.wheel-wrap { position: absolute; z-index: 3; width: 89%; aspect-ratio: 1; top: 2%; left: 5.5%; filter: drop-shadow(0 12px 14px rgba(91,0,0,.46)); }
.rotor { position: absolute; inset: 8.3%; z-index: 1; overflow: hidden; border-radius: 50%; transform: rotate(0deg); will-change: transform; }
.rotor img, .wheel-frame { display: block; width: 100%; height: 100%; }
.rotor img { position: absolute; inset: 0; object-fit: contain; }
.wheel-base { z-index: 0; }
.wheel-labels { z-index: 1; }
.wheel-frame { position: absolute; inset: 0; z-index: 2; object-fit: contain; pointer-events: none; }
.pointer { position: absolute; z-index: 5; width: 18%; height: auto; top: 0; left: 41%; filter: drop-shadow(0 4px 5px rgba(91,0,0,.55)); }
.spin { position: absolute; z-index: 6; width: 23%; aspect-ratio: 1; top: 38.5%; left: 38.5%; border: 0; border-radius: 50%; color: #fff; background: transparent url("assets/redHot100/img/wheel-btn.webp") center / contain no-repeat; font: 900 clamp(16px, 2.8vw, 29px)/1 Arial, sans-serif; text-shadow: 0 3px 2px #8d0000, 0 0 5px #fff8c6; cursor: pointer; filter: drop-shadow(0 5px 7px rgba(91,0,0,.5)); animation: pulse 1.4s ease-in-out infinite; }
.spin:disabled { cursor: default; animation: none; opacity: .96; }
.spin:focus-visible, .claim:focus-visible, .close:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
.prize { position: absolute; z-index: 4; width: 19%; height: auto; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(77,0,0,.48)); }
.prize-a { left: -2%; bottom: 4%; transform: rotate(-10deg); }
.prize-b { right: -2%; bottom: 4%; transform: rotate(10deg); }
.status { position: relative; z-index: 8; min-height: 28px; margin: -7% 0 0; text-align: center; color: #fff6a2; font-size: clamp(17px, 2.4vw, 24px); font-weight: 900; text-shadow: 0 3px 2px #a00000; }
.modal[hidden] { display: none; }
.modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 14px; background: rgba(92,0,0,.87); backdrop-filter: blur(5px); }
.modal-card { position: relative; width: min(500px, 94vw); max-height: calc(100vh - 28px); max-height: calc(100svh - 28px); padding: 35px 24px 29px; overflow-y: auto; overscroll-behavior: contain; text-align: center; border: 4px solid #ffe961; border-radius: 28px; color: #fff; background: linear-gradient(165deg, #f13a14, #a40000 58%, #670000); box-shadow: 0 0 0 6px #ff8c13, 0 18px 70px rgba(73,0,0,.72), inset 0 0 30px rgba(255,234,89,.25); }
.modal-card > * { position: relative; }
.win-art { display: block; width: min(84vw, 425px); max-width: 100%; max-height: min(18vh, 120px); max-height: min(18svh, 120px); height: auto; object-fit: contain; margin: 0 auto 10px; }
.modal h2 { margin: 2px 0 8px; font-size: clamp(24px, 7vw, 38px); color: #fff09a; text-shadow: 0 3px 2px #8d0000; }
.modal p { margin: 0; font-size: 20px; font-weight: 800; }
.result { display: block; margin: 5px 0 19px; color: #fff36b; font-size: clamp(31px, 9vw, 47px); text-shadow: 0 3px 2px #8d0000; }
.claim { display: inline-flex; justify-content: center; align-items: center; min-width: 230px; min-height: 60px; padding: 13px 30px; border: 3px solid #fff2a0; border-radius: 999px; color: #5b1e00; background: linear-gradient(#fff779, #ffc329 58%, #ec7410); box-shadow: 0 5px 0 #8c2d00, 0 8px 22px rgba(77,0,0,.45); 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: drop-shadow(0 5px 14px rgba(255,206,50,.85)); } }
@media (max-width: 640px) {
  body { background-attachment: scroll; }
  .logo { width: min(600px, 88vw); margin-top: 15px; margin-bottom: 10px; }
  .stage { width: min(660px, 100vw); }
  .wheel-wrap { width: 95%; left: 2.5%; }
  .status { margin-top: -8%; }
  .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: 430px; max-height: calc(100vh - 20px); max-height: calc(100svh - 20px); padding: 29px 17px 23px; }
  .win-art { width: min(84vw, 370px); max-height: min(16vh, 105px); max-height: min(16svh, 105px); }
}
@media (max-width: 360px), (max-height: 620px) {
  .modal-card { padding: 23px 13px 17px; }
  .win-art { width: min(78vw, 310px); max-height: 13vh; max-height: 13svh; }
  .modal h2 { margin-top: 0; font-size: clamp(22px, 7vw, 30px); }
  .result { margin-bottom: 13px; font-size: clamp(28px, 9vw, 37px); }
  .claim { min-height: 53px; padding-block: 9px; }
}
@media (max-height: 720px) and (orientation: landscape) { .logo { width: 440px; margin-block: 3px; } .game h1 { font-size: 22px; } .stage { width: min(500px, 72vh); } .status { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
