* { 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%);
}

.layout { display: flex; align-items: center; justify-content: center; gap: 60px; width: 100%; max-width: 1240px; padding: 24px 12px 40px; }
.stage { display: flex; flex-direction: column; align-items: center; }

.panel {
  flex: 0 0 240px; width: 240px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid #f0d9b8; border-radius: 14px;
  padding: 14px 12px;
  box-shadow: 0 8px 22px rgba(232, 93, 16, .18);
}
.panel h4 { color: #e85d10; font-size: 16px; letter-spacing: 1px; text-align: center; margin: 0 0 10px; }
.check-input { margin-top: 4px; }
.check-btn { width: 100%; margin-top: 10px; }
.check-result { margin-top: 12px; background: #fff7ea; border-radius: 8px; padding: 10px; text-align: center; }
.check-result p { font-size: 13px; color: #4a2c12; font-weight: 600; margin: 4px 0 0; }
.check-result.lose p { color: #9a8a76; font-weight: 400; }
.rc-code { color: #a08462; font-size: 11px; letter-spacing: 1px; font-family: Consolas, monospace; }
.rc-name { color: #4a2c12; font-size: 13px; font-weight: 600; word-break: break-word; }
.rc-name.lose { color: #9a8a76; font-weight: 400; }
.rc-time { color: #b09a80; font-size: 11px; }
.empty { color: #b09a80; font-size: 13px; text-align: center; padding: 24px 0; }
.marquee { height: 430px; overflow: hidden; }
.marquee-track { animation: scroll-up 30s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.win-row { display: flex; flex-direction: column; gap: 2px; background: #fff7ea; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.win-img { width: 26px; height: 26px; object-fit: contain; margin: 0 auto 4px; }
.win-name { color: #e85d10; font-size: 13px; font-weight: 600; word-break: break-word; }
.win-name.lose { color: #9a8a76; font-weight: 400; }

@media (max-width: 1100px) {
  /* 窄屏与 H5：轮盘置顶，两块记录面板并排置于轮盘下方 */
  .layout { flex-wrap: wrap; gap: 24px; }
  .stage { order: -1; width: 100%; }
  .panel { flex: 1 1 46%; width: auto; }
  .marquee { height: 260px; }
}

.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%);
}
/* 计数文案已移除，底座仅作造型保留；去掉投影并上贴 1px，消除与中柱间的暗缝 */
.stand-base {
  min-width: 220px;
  height: 40px;
  margin-top: -1px;
  border-radius: 10px 10px 14px 14px;
  background: linear-gradient(180deg, #f9822f, #e0560c);
}

.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; }
