:root { color-scheme: dark; font-family: Arial, Helvetica, sans-serif; background: #0b72cb; }
* { 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: #0b72cb url("assets/sweetBurst/img/page-bg-desktop.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(10px, env(safe-area-inset-top)) 4px max(20px, env(safe-area-inset-bottom)); overflow: hidden; }
.page::before { content: ""; position: fixed; z-index: -1; inset: 0; background: linear-gradient(rgba(28,104,214,.04), rgba(85,28,150,.15)); pointer-events: none; }
.logo { position: relative; z-index: 3; display: block; width: min(430px, 64vw); height: auto; margin: -4px auto -6px; filter: drop-shadow(0 6px 7px rgba(81,0,110,.42)); }
.game { position: relative; z-index: 2; width: min(1040px, 100%); display: flex; flex-direction: column; align-items: center; }
.game h1 { margin: 0; color: #fff; font-size: clamp(25px, 4vw, 43px); line-height: 1; text-align: center; text-shadow: 0 4px 2px #8c075f, 0 0 9px #ff63db; }
.stage { position: relative; width: min(770px, 99vw); aspect-ratio: 1; margin-top: 2px; }
.wheel-wrap { position: absolute; width: 88%; aspect-ratio: 1; top: 2%; left: 6%; }
.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; }
.rotor .wheel-base { z-index: 0; }
.rotor .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: 16%; height: auto; top: -.5%; left: 42%; filter: drop-shadow(0 4px 5px rgba(87,0,73,.5)); }
.spin { position: absolute; z-index: 6; width: 24%; aspect-ratio: 1; top: 38%; left: 38%; border: 0; border-radius: 50%; color: #fff; background: transparent url("assets/sweetBurst/img/wheel-btn.webp") center / contain no-repeat; font: 900 clamp(17px, 3vw, 30px)/1 Arial, sans-serif; text-shadow: 0 3px 2px #91004f, 0 0 5px #fff; cursor: pointer; filter: drop-shadow(0 5px 6px rgba(93,0,76,.45)); animation: pulse 1.4s ease-in-out infinite; }
.spin:disabled { cursor: default; animation: none; opacity: .95; }
.spin:focus-visible, .claim:focus-visible, .close:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
.decor { position: absolute; z-index: 4; width: 28%; height: auto; pointer-events: none; filter: drop-shadow(0 8px 7px rgba(65,0,91,.4)); }
.decor-left { left: -2%; bottom: 3%; transform: rotate(-9deg); }
.decor-right { right: -2%; bottom: 7%; width: 22%; transform: rotate(9deg); }
.status { position: relative; z-index: 7; min-height: 28px; margin: -7% 0 0; text-align: center; color: #fff; font-size: clamp(17px, 2.4vw, 24px); font-weight: 900; text-shadow: 0 3px 2px #8c075f; }
.modal[hidden] { display: none; }
.modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 14px; background: rgba(46,7,92,.82); 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 #fff176; border-radius: 28px; color: #fff; background: #c127ac url("assets/sweetBurst/img/modal-bg.webp") center / cover no-repeat; box-shadow: 0 0 0 6px #f03dba, 0 18px 70px rgba(47,0,84,.68), inset 0 0 30px rgba(255,255,255,.22); }
.modal-card::before { content: ""; position: absolute; inset: 0; background: rgba(95,10,128,.12); pointer-events: none; }
.modal-card > * { position: relative; }
.win-art { display: block; width: min(82vw, 410px); 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: #fff8b0; text-shadow: 0 3px 2px #8f075f; }
.modal p { margin: 0; font-size: 20px; font-weight: 800; }
.result { display: block; margin: 5px 0 19px; color: #fff16b; font-size: clamp(31px, 9vw, 47px); text-shadow: 0 3px 2px #94065e; }
.claim { display: inline-flex; justify-content: center; align-items: center; min-width: 230px; min-height: 60px; padding: 13px 30px; border: 3px solid #fff7a9; border-radius: 999px; color: #67104f; background: linear-gradient(#fff778, #ffc124 58%, #f27612); box-shadow: 0 5px 0 #a63300, 0 8px 22px rgba(67,0,81,.42); 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 13px rgba(255,78,214,.8)); } }
@media (max-width: 640px) {
  body { background-image: url("assets/sweetBurst/img/page-bg-mobile.webp"); background-attachment: scroll; }
  .page { padding-left: 2px; padding-right: 2px; }
  .logo { width: min(390px, 76vw); }
  .stage { width: min(650px, 100vw); }
  .wheel-wrap { width: 94%; left: 3%; top: 2%; }
  .decor { width: 21%; bottom: 6%; }
  .status { margin-top: -9%; }
  .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(82vw, 360px); 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(77vw, 300px); 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: 330px; } .game h1 { font-size: 22px; } .stage { width: min(500px, 72vh); } .status { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
