* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: linear-gradient(180deg, #bfe6ff 0%, #e8f6ff 45%, #ffe9c9 100%);
}

.stage { display: flex; flex-direction: column; align-items: center; padding: 24px 12px 40px; }

.wheel-box { position: relative; width: min(88vw, 560px, 78vh); aspect-ratio: 1; }

.rim {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb35c 0%, #f97b2a 55%, #e85d10 100%);
  box-shadow: 0 10px 26px rgba(232, 93, 16, .35), inset 0 -6px 14px rgba(140, 50, 0, .35), inset 0 6px 10px rgba(255, 220, 170, .6);
}

.bulb {
  position: absolute;
  width: 4.6%; aspect-ratio: 1;
  border-radius: 50%;
  background: #fff7e0;
  box-shadow: 0 0 6px rgba(255, 240, 180, .9);
  transform: translate(-50%, -50%);
}
.bulb:nth-child(even) { background: #ffd23e; }

.spinning .bulb { animation: blink .45s steps(1) infinite alternate; animation-delay: calc(var(--i) * .09s); }
@keyframes blink { from { background: #fff7e0; } to { background: #ffd23e; } }

.face {
  position: absolute; inset: 8.5%;
  width: 83%; height: 83%;
  border-radius: 50%;
  background: #fff9f0;
  box-shadow: inset 0 0 0 4px #fff, 0 0 10px rgba(160, 70, 0, .25);
  will-change: transform;
}

.hub {
  position: absolute; left: 50%; top: 50%;
  width: 26%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8fae 0%, #f3477d 60%, #d92c66 100%);
  box-shadow: 0 6px 14px rgba(217, 44, 102, .45), inset 0 -5px 10px rgba(150, 10, 60, .35), inset 0 4px 8px rgba(255, 200, 220, .7);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none;
  transition: transform .12s;
}
.hub:active { transform: translate(-50%, -50%) scale(.94); }
.hub.busy { pointer-events: none; filter: saturate(.6); }

.hub-text {
  color: #fff; font-size: clamp(15px, 4.6vw, 21px); font-weight: 700;
  line-height: 1.25; text-align: center; text-shadow: 0 2px 3px rgba(150, 10, 60, .5);
}

.pointer {
  position: absolute; left: 50%; top: -4px;
  width: 0; height: 0;
  transform: translateX(-50%);
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid #e6396b;
  z-index: 6;
  filter: drop-shadow(0 2px 2px rgba(150, 10, 60, .4));
}

.stand { display: flex; flex-direction: column; align-items: center; margin-top: -6px; }
.stand-neck {
  width: 26%; min-width: 90px; height: 46px;
  background: linear-gradient(180deg, #f97b2a, #e85d10);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}
.stand-base {
  min-width: 220px;
  padding: 9px 26px;
  border-radius: 10px 10px 14px 14px;
  background: linear-gradient(180deg, #f9822f, #e0560c);
  color: #fff; font-size: 15px; letter-spacing: 1px;
  box-shadow: 0 6px 14px rgba(232, 93, 16, .35);
}
.stand-base b { font-size: 17px; margin: 0 2px; }

.mask {
  position: fixed; inset: 0;
  background: rgba(20, 20, 30, .45);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
}
.dialog {
  width: min(88vw, 320px);
  background: #fff; border-radius: 16px;
  padding: 24px 22px 20px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}
.dialog h3 { font-size: 18px; color: #4a2c12; margin-bottom: 16px; }

.code-input {
  width: 100%; padding: 10px 12px;
  border: 2px solid #f9b26a; border-radius: 10px;
  font-size: 16px; text-align: center; letter-spacing: 2px;
  outline: none; color: #4a2c12;
}
.code-input:focus { border-color: #f97b2a; }

.err { min-height: 20px; margin-top: 8px; color: #d93025; font-size: 13px; }

.dialog-btns { display: flex; gap: 12px; justify-content: center; margin-top: 6px; }
.btn {
  padding: 9px 26px; border: none; border-radius: 20px;
  font-size: 15px; cursor: pointer; font-family: inherit;
}
.btn.primary { background: linear-gradient(180deg, #ff9a3c, #f26a0f); color: #fff; box-shadow: 0 4px 10px rgba(242, 106, 15, .4); }
.btn.ghost { background: #f2ede6; color: #7a6a55; }

.result-img { width: 64px; height: 64px; object-fit: contain; margin: 0 auto 10px; }
.result-name { font-size: 22px; font-weight: 700; color: #e85d10; margin: 10px 0 18px; }
