/* ===== 遮罩层 ===== */
#wheelModal {
  position: fixed;
  inset: 0;

  display: flex;
  align-items: flex-start;   /* 🔥 关键：从上开始 */
  justify-content: center;

  padding-top: 120px;        /* 🔥 给 header + 用户区留空间 */

  background: rgba(0,0,0,0.8);

  z-index: 999;
}

/* ===== 转盘容器 ===== */
.wheel-box {
  width: 360px;
  text-align: center;
  position: relative;
}

/* ===== 转盘 ===== */
#wheelCanvas {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  transition: transform 4s cubic-bezier(0.25, 1, 0.5, 1);
}
#wheel-container {
  margin-top: 10px;
}

/* ===== 指针 ===== */
.pointer {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 36px;
  color: #ff3b30;
  z-index: 3;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}

.close-btn {
  position: absolute;
  top: -10px;
  right: -10px;

  width: 30px;
  height: 30px;

  background: #000;
  color: #fff;

  border-radius: 50%;
  font-size: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  border: 2px solid #ffd700;
  box-shadow: 0 0 10px rgba(255,215,0,0.6);
}

.close-btn:active {
  transform: scale(0.9);
}

/* ===== 结果 ===== */
#wheelResult {
  margin-top: 15px;
  color: #ffd700;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 2px 4px #000;
}

/* ===== 弹窗遮罩 ===== */
.reward-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;
}

/* ===== 弹窗盒子 ===== */
.reward-box {
  width: 300px;
  padding: 25px;
  border-radius: 20px;
  background: linear-gradient(180deg, #111, #000);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  animation: popIn 0.3s ease;
  transform: scale(1);

  border: 2px solid #ffd700;
  box-shadow: 0 0 20px rgba(255,215,0,0.6);
}

/* 标题 */
.reward-title {
  font-size: 22px;
  color: #ffd700;
  font-weight: bold;
  margin-bottom: 12px;
  text-shadow: 0 0 10px #ffd700;
}

/* 金额 */
.reward-amount {
  font-size: 36px;
  color: #ffd700;
  font-weight: bold;
  margin: 20px 0;
  text-shadow: 0 0 20px #ffd700;
}

/* 描述 */
.reward-desc {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 20px;
}

/* 按钮 */
.modal-btn {
  background: linear-gradient(145deg, #ffd700, #ffcc00);
  border: none;
  padding: 12px 40px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
}

/* ===== 错误弹窗遮罩 ===== */
.error-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;
}

/* ===== 弹窗盒子 ===== */
.error-box {
  width: 280px;
  padding: 25px;
  border-radius: 20px;
  background: linear-gradient(180deg, #111, #000);
  border: 2px solid #ff3b30;
  box-shadow: 0 0 20px rgba(255,59,48,0.6);
  animation: popIn 0.3s ease;
}

/* 图标 */
.error-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

/* 文本 */
.error-text {
  color: #fff;
  font-size: 16px;
  margin-bottom: 20px;
}

/* 按钮 */
.modal-btn {
  background: linear-gradient(145deg, #ffd700, #ffcc00);
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  font-size: 15px;
  color: #000;
  margin-top: 15px;
}

.modal-btn:active {
  transform: scale(0.95);
}

/* 动画 */
@keyframes popIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}