:root {
  --theme: #ff5a5f;
  --bg1: #ff8a65;
  --bg2: #ff4d6d;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: linear-gradient(160deg, var(--bg1), var(--bg2) 60%, #c81d4e);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.page { max-width: 480px; margin: 0 auto; padding: 24px 16px 40px; }

.header { text-align: center; margin-bottom: 20px; }
.header h1 {
  font-size: 26px; font-weight: 800; letter-spacing: 1px;
  text-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.header p { margin-top: 8px; font-size: 14px; opacity: .9; }
.times {
  display: inline-block; margin-top: 12px; padding: 4px 14px;
  background: rgba(0,0,0,.2); border-radius: 999px; font-size: 13px;
}

/* 转盘 */
.wheel-wrap {
  position: relative;
  width: 100%; max-width: 340px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.wheel-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--theme);
  box-shadow: 0 10px 30px rgba(0,0,0,.3), inset 0 0 0 4px rgba(255,255,255,.35);
}
.wheel-ring::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, #fff 0 4deg, transparent 4deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 92%, #000 92.5%);
  mask: radial-gradient(circle, transparent 92%, #000 92.5%);
  opacity: .9;
}
#wheel {
  position: absolute; inset: 7%;
  width: 86%; height: 86%;
  border-radius: 50%;
  display: block;
  background: #fff;
  will-change: transform;
}
.pointer {
  position: absolute; left: 50%; top: 50%;
  width: 26%; height: 26%;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.pointer::before {
  content: ""; position: absolute; left: 50%; top: -34%;
  width: 0; height: 0; transform: translateX(-50%);
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 34px solid var(--theme);
  filter: drop-shadow(0 -2px 2px rgba(0,0,0,.15));
}
#spinBtn {
  width: 100%; height: 100%;
  border-radius: 50%; border: 4px solid #fff;
  background: radial-gradient(circle at 35% 30%, #ffb199, var(--theme));
  color: #fff; font-weight: 800; font-size: 17px; line-height: 1.2;
  white-space: pre-line;
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
  cursor: pointer;
  transition: transform .15s;
}
#spinBtn:active { transform: scale(.94); }
#spinBtn.disabled { filter: grayscale(.4); pointer-events: none; }

/* 记录 */
/* 奖品一览 */
.showcase { margin-top: 28px; background: rgba(255,255,255,.14); border-radius: 14px; padding: 14px; }
.showcase h3 { font-size: 15px; margin-bottom: 12px; }
.showcase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.showcase-card {
  position: relative; background: #fff; color: #333; border-radius: 12px;
  padding: 10px 10px 12px; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.showcase-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.showcase-grid.single { grid-template-columns: 1fr; }
.showcase-grid.single .showcase-card img { width: 78%; margin: 0 auto; }
.showcase-tag {
  position: absolute; left: 8px; top: 8px; z-index: 1;
  background: var(--theme); color: #fff; font-size: 12px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
}
.showcase-desc { margin-top: 6px; font-size: 14px; font-weight: 600; line-height: 1.4; }

.records { margin-top: 32px; background: rgba(255,255,255,.14); border-radius: 14px; padding: 14px; }
.records h3 { font-size: 15px; margin-bottom: 10px; }
.records ul { list-style: none; max-height: 180px; overflow-y: auto; }
.records li {
  display: flex; justify-content: space-between; font-size: 13px;
  padding: 7px 0; border-bottom: 1px dashed rgba(255,255,255,.25);
}
.records li:last-child { border-bottom: none; }
.records li .win { color: #ffe066; font-weight: 600; }
.records li.empty { justify-content: center; opacity: .7; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal.show { opacity: 1; pointer-events: auto; }
.modal-box {
  width: 86%; max-width: 340px;
  background: #fff; color: #333; border-radius: 18px;
  padding: 28px 22px 22px; text-align: center;
  transform: scale(.8); transition: transform .25s;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.modal.show .modal-box { transform: scale(1); }
.modal-icon { font-size: 56px; line-height: 1; }
.modal-img {
  display: block; width: 82%; max-width: 240px; aspect-ratio: 1 / 1;
  margin: -8px auto 0; object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.18));
}
.modal-title { margin-top: 12px; font-size: 20px; font-weight: 800; color: #888; }
.modal.win .modal-title { color: var(--theme); }
.modal-prize { margin-top: 6px; font-size: 16px; font-weight: 600; }
.modal-msg { margin-top: 10px; font-size: 14px; color: #666; line-height: 1.6; }
.modal-btns { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.modal-btns button {
  height: 44px; border-radius: 22px; border: none; font-size: 15px; font-weight: 600; cursor: pointer;
}
#mJump { background: var(--theme); color: #fff; }
#mClose { background: #f2f2f2; color: #666; }

.toast {
  position: fixed; left: 50%; bottom: 14%; z-index: 60;
  transform: translateX(-50%);
  background: rgba(0,0,0,.75); color: #fff; font-size: 14px;
  padding: 10px 18px; border-radius: 999px;
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.toast.show { opacity: 1; }
