/* Wheel of SUS order-bonus page. Brand palette: #2e2e30 #e7b85f #020201 #985a2a #f9f8f6 #c59240 */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #fff; color: #101010;
  font-family: "Space Grotesk", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.top { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px 12px; }
.pills { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- game-show marquee sign ---------- */
.marquee {
  position: relative; width: min(100%, 720px); padding: 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, #8d3fd6 0%, #5b1a9e 48%, #3c0f6e 100%);
  border: 3px solid #1d0638;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.28), inset 0 -6px 0 rgba(0,0,0,.35), 0 8px 0 #1d0638, 0 14px 28px rgba(40,6,80,.35);
}
.marquee-face {
  position: relative; border-radius: 14px; padding: 14px 18px 16px;
  background: radial-gradient(120% 140% at 50% 0%, #6d24bd 0%, #45117f 55%, #2b0852 100%);
  border: 3px solid #e7b85f;
  box-shadow: inset 0 0 0 3px #2b0852, inset 0 6px 18px rgba(0,0,0,.45), 0 0 0 2px rgba(255,255,255,.12);
  text-align: center;
}
.marquee-title {
  margin: 0; line-height: .95; letter-spacing: .03em; white-space: nowrap;
  font-family: "Arial Black", "Archivo Black", Impact, "Helvetica Neue", system-ui, sans-serif; font-weight: 900;
  font-size: clamp(26px, 8.4vw, 74px);
  color: #ffd76a;
  background: linear-gradient(180deg, #fff6d2 0%, #ffd76a 42%, #e7a63a 72%, #c27b1c 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px #1d0638; paint-order: stroke fill;
  filter: drop-shadow(0 4px 0 #1d0638) drop-shadow(0 0 14px rgba(255,205,90,.45));
}
.marquee-title .of { font-size: .62em; vertical-align: .18em; }
.marquee-bulbs { position: absolute; inset: 0; pointer-events: none; }
.bulb {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffef4 0%, #ffe9a0 35%, #f2b33a 75%, #b8761a 100%);
  box-shadow: 0 0 0 2px #2a0a4d, 0 0 8px 2px rgba(255,214,110,.85), 0 0 18px 4px rgba(255,190,70,.45);
  animation: bulb-chase 1.2s steps(1, end) infinite;
}
.bulb.p1 { animation-delay: -.4s; } .bulb.p2 { animation-delay: -.8s; }
@keyframes bulb-chase {
  0%   { filter: none; opacity: 1; }
  66%  { filter: brightness(.55) saturate(.8); opacity: .75;
         box-shadow: 0 0 0 2px #2a0a4d, 0 0 3px 1px rgba(255,214,110,.35); }
}
@media (prefers-reduced-motion: reduce) { .bulb { animation: none; } }
@media (max-width: 600px) { .arrow { width: 56px; height: 68px; } .stage { margin-top: 44px; } }
.badge { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: #101010; color: #fff; }
.tag { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #ffe9a8; border: 2px dashed #985a2a; color: #5a3210; }

.main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0 8px 16px; width: 100%; }
.stage { position: relative; width: 100%; display: flex; justify-content: center; margin-top: 62px; overflow-x: clip; }
/* ---------- big game-show arrow (SVG; tip pinned to the landing point by JS) ---------- */
.arrow { position: absolute; z-index: 3; transform-origin: 50% 100%; rotate: 45deg; width: 78px; height: 95px; overflow: visible; pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255,60,60,.35)); transform-origin: 50% 100%; }
.arrow .ar-bulbs circle { fill: #fff3c4; stroke: #8a5a12; stroke-width: 1.5; filter: drop-shadow(0 0 3px #ffd76a);
  animation: ar-tw 1.2s steps(1, end) infinite; }
.arrow .ar-bulbs circle:nth-child(3n+2) { animation-delay: -.4s; } .arrow .ar-bulbs circle:nth-child(3n) { animation-delay: -.8s; }
@keyframes ar-tw { 0% { fill: #fff3c4; } 66% { fill: #c99a45; } }
.arrow.landed { animation: ar-bounce .9s ease-out 1; }
.arrow.landed .ar-bulbs circle { animation: ar-flash .15s steps(1, end) 6; }
@keyframes ar-bounce { 0%,100% { transform: translateY(0); } 20% { transform: translateY(-14px); } 40% { transform: translateY(0); }
  60% { transform: translateY(-6px); } 80% { transform: translateY(0); } }
@keyframes ar-flash { 0% { fill: #ffffff; } 50% { fill: #ffd76a; } }
@media (prefers-reduced-motion: reduce) { .arrow, .arrow.landed, .arrow .ar-bulbs circle, .arrow.landed .ar-bulbs circle { animation: none; } }
/* The viewport may crop the 800x400 logical stage to its first 770 columns on 2x phones (the wheel ends at x = 768),
   so the canvas can stay at an integer device-pixel scale. JS sets exact sizes. */
.viewport { position: relative; overflow: hidden; border: 0; background: transparent; line-height: 0; max-width: 100%; }
#game { position: relative; display: block; image-rendering: pixelated; image-rendering: crisp-edges; background: transparent; }
/* smooth, full-resolution wheel UNDER the pixel-art Sus Dog canvas (no pixelated rendering) */
#wheel { position: absolute; left: 0; top: 0; display: block; image-rendering: auto; }

.controls { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; }
.status { margin: 0; font-size: 15px; font-weight: 600; text-align: center; min-height: 1.3em; }
.spin {
  background: #101010; color: #fff; border: 0; border-radius: 999px; padding: 16px 56px;
  font-family: inherit; font-size: 24px; font-weight: 800; line-height: 1; letter-spacing: .08em; cursor: pointer;
  touch-action: manipulation;
}
.spin:disabled { opacity: .35; cursor: default; }
.spin[hidden] { display: none; }
.spins-left { margin: 0; font-size: 13px; font-weight: 700; color: #985a2a; }

.card {
  width: 100%; max-width: 560px; margin-top: 16px; background: #fff; border: 2px solid #101010; border-radius: 16px;
  padding: 16px 18px; text-align: center; box-shadow: 0 6px 0 #101010;
}
.card h2 { margin: 0; font-size: 24px; font-weight: 800; }
.card .sub { margin: 6px 0 0; font-size: 15px; }
.card .note { margin: 10px 0 0; font-size: 13px; color: #444; }
.code-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.code-label { width: 100%; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #985a2a; }
.code {
  font: 800 20px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em;
  background: #f9f8f6; border: 2px dashed #985a2a; border-radius: 10px; padding: 8px 12px; word-break: break-all;
  user-select: all;
}
.copy, .secondary {
  border: 2px solid #101010; background: #e7b85f; color: #101010; border-radius: 999px; padding: 9px 16px;
  font: 800 15px/1 inherit; cursor: pointer; touch-action: manipulation;
}
.copy.copied { background: #101010; color: #fff; }
.shop {
  display: inline-block; margin-top: 14px; background: #101010; color: #fff; text-decoration: none; border-radius: 999px;
  padding: 12px 24px; font-weight: 800; font-size: 16px;
}
.history ol { text-align: left; margin: 10px 0 0; padding-left: 22px; }
.history li { margin: 8px 0; font-size: 15px; }
.history li .code { font-size: 15px; padding: 3px 8px; }
.history li .copy { padding: 5px 10px; font-size: 13px; margin-left: 6px; }
.problem h2 { color: #985a2a; }
.problem .secondary { margin-top: 12px; }
.foot { text-align: center; font-size: 12px; color: #555; padding: 10px 16px 18px; }
.foot a { color: inherit; }
.foot .rules-link { display: inline-block; margin-top: 6px; padding: 10px 14px; font-size: 14px; font-weight: 600; text-decoration: underline; }

@media (max-width: 820px) {
  .main { padding: 0 0 16px; }            /* let the stage use the full width so it stays at an integer scale */
  .card { width: calc(100% - 16px); }
}
@media (max-width: 520px) {
  .marquee { padding: 16px; border-radius: 20px; } .bulb { width: 10px; height: 10px; margin: -5px 0 0 -5px; }
  .spin { padding: 15px 44px; font-size: 22px; }
  .card { padding: 14px 12px; }
  .card h2 { font-size: 21px; }
  .code { font-size: 17px; }
}
[hidden] { display: none !important; }

.floor-bulbs { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.bulb.floor { width: 10px; height: 10px; margin: -5px 0 0 -5px; }
@media (max-width: 600px) { .bulb.floor { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; } }

@media (max-width: 600px) { .main { padding-left: 0; padding-right: 0; } }
@media (max-width: 600px) { .arrow { width: 42px; height: 51px; } }
