/* ========================================================
   Apple 风格幸运转盘与在线客服系统样式
   ======================================================== */

:root {
  --wheel-theme-blue: #0071e3;
  --wheel-theme-hover: #0077ed;
  --wheel-bg-gray: #f5f5f7;
}

/* 转盘主区块：手机全宽，贴边显示 */
.lucky-wheel-section {
  position: relative;
  width: 100%;
  background: #ffffff;
  padding: 0;
  display: block;
  overflow: hidden;
  box-sizing: border-box;
}

.wheel-outer-container {
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.wheel-stage {
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
}

/* 背景图自然撑开 */
.wheel-bg-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.wheel-copy {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 2.2%;
  z-index: 6;
  text-align: center;
  pointer-events: none;
  color: #1d1d1f;
}

.wheel-kicker {
  margin: 0;
  color: #0071e3;
  font-size: 3.3vw;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wheel-title {
  margin: 0.6vw 0 0;
  font-size: 5.8vw;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.wheel-sub,
.wheel-caption,
.wheel-hint {
  margin: 0.8vw 0 0;
  color: #6e6e73;
  font-size: 3vw;
  line-height: 1.35;
}

.wheel-caption {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 29.3%;
  margin: 0;
  text-align: center;
  z-index: 6;
  pointer-events: none;
}

.wheel-hint {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 76.4%;
  margin: 0;
  text-align: center;
  z-index: 6;
  pointer-events: none;
  font-size: 2.7vw;
}

/* 转盘落在背景空白区，12 点方向对准第一格中线 */
.wheel-interactive-area {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 76%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  z-index: 10;
  container-type: inline-size;
}

/* 顶部蓝色倒三角指针 */
.wheel-pointer {
  position: absolute;
  left: 50%;
  top: -3.8%;
  transform: translateX(-50%);
  width: 14.1%;
  z-index: 25;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.28));
  transition: transform 0.2s ease;
}

.wheel-pointer img {
  display: block;
  width: 100%;
  height: auto;
}

.wheel-pointer.bouncing {
  animation: pointerNudge 0.12s ease-in-out infinite alternate;
}

@keyframes pointerNudge {
  0% { transform: translateX(-50%) rotate(0deg); }
  100% { transform: translateX(-50%) rotate(-4deg); }
}

/* 旋转大圆盘 */
.wheel-disc-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-sizing: border-box;
  transform-origin: 50% 50%;
  will-change: transform;
  -webkit-transform-origin: 50% 50%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.wheel-disc-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.wheel-sector {
  position: absolute;
  inset: 0;
  transform: rotate(var(--a));
  pointer-events: none;
}

.wheel-sector-inner {
  position: absolute;
  left: 50%;
  top: 11%;
  width: 20%;
  transform: translateX(-50%) rotate(calc(var(--a) * -1));
  transform-origin: center center;
  text-align: center;
}

.wheel-sector-inner img {
  display: block;
  width: 70%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.wheel-sector-label {
  display: block;
  margin-top: 0.2cqw;
  color: #1d1d1f;
  font-size: 2.8cqw;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  overflow: hidden;
}

/* 中心按钮盖住圆盘中心，文字不跟着转 */
.wheel-center-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 31%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 30;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  color: #fff;
}

.wheel-center-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.wheel-center-label {
  position: absolute;
  inset: 18% 12%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 4.2cqw;
  font-weight: 700;
  line-height: 1.15;
  white-space: pre-line;
  pointer-events: none;
}

.wheel-center-btn:disabled {
  cursor: not-allowed;
}

.wheel-action-btn {
  position: absolute;
  top: 69.6%;
  left: 50%;
  transform: translateX(-50%);
  width: 62%;
  aspect-ratio: 461 / 72;
  border-radius: 9999px;
  cursor: pointer;
  border: none;
  padding: 0 6%;
  z-index: 35;
  outline: none;
  overflow: hidden;
  color: #fff;
  background: url("../images/lottery/button.png") center / 100% 100% no-repeat;
  font-size: 4vw;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wheel-action-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  animation: actionShimmer 3s ease-in-out infinite;
}

@keyframes actionShimmer {
  0% { left: -70%; }
  40% { left: 130%; }
  100% { left: 130%; }
}

.wheel-action-btn:hover:not(:disabled) {
  box-shadow: 0 0 16px rgba(0, 113, 227, 0.4);
}

.wheel-action-btn:active:not(:disabled) {
  transform: translateX(-50%) scale(0.98);
}

.wheel-action-label {
  position: relative;
  z-index: 1;
}

.wheel-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ========================================================
   中奖结果模态弹窗 (提示联系客服获取)
   ======================================================== */

.wheel-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 20px;
  box-sizing: border-box;
}

.wheel-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.wheel-modal-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 24px;
  padding: 32px 28px 24px 28px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.22), 0 0 1px rgba(0, 0, 0, 0.15);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wheel-modal-overlay.active .wheel-modal-card {
  transform: scale(1) translateY(0);
}

.wheel-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #666;
  transition: background 0.2s, transform 0.2s;
}

.wheel-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.08);
}

.wheel-modal-badge {
  display: inline-block;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--wheel-theme-blue);
  margin-bottom: 12px;
}

.wheel-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.wheel-modal-prize-box {
  background: linear-gradient(135deg, rgba(245, 245, 247, 0.9) 0%, rgba(235, 238, 245, 0.9) 100%);
  border-radius: 18px;
  padding: 18px 16px;
  margin: 16px 0 20px 0;
  border: 1px solid rgba(0, 113, 227, 0.15);
}

.wheel-modal-prize-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--wheel-theme-blue);
  margin: 0;
  letter-spacing: -0.01em;
}

.wheel-modal-instruction {
  font-size: 16px;
  color: #1d1d1f;
  line-height: 1.6;
  margin: 0 0 24px 0;
  font-weight: 500;
}

.wheel-modal-instruction strong {
  color: #e30000;
  font-size: 17px;
  font-weight: 700;
}

.wheel-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wheel-btn-contact-kf {
  width: 100%;
  padding: 14px 20px;
  background: var(--wheel-theme-blue);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.38);
}

.wheel-btn-contact-kf:hover {
  background: var(--wheel-theme-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.48);
}

.wheel-btn-secondary {
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  color: #6e6e73;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s;
}

.wheel-btn-secondary:hover {
  color: #1d1d1f;
}

/* ========================================================
   右侧在线客服浮窗 (仅使用 kefu 图标，点击直接跳转指定链接)
   ======================================================== */

.kefu-float-btn {
  position: fixed;
  right: 14px;
  bottom: 30px;
  width: 92px;
  height: auto;
  z-index: 99999;
  cursor: pointer;
  text-decoration: none;
  display: block;
  outline: none;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.25));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.kefu-float-btn img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.kefu-label {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 79%;
  height: 17%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.kefu-float-btn:hover {
  transform: translateY(-4px) scale(1.08);
  filter: drop-shadow(0 10px 22px rgba(0, 113, 227, 0.4));
}

.kefu-float-btn:active {
  transform: scale(0.95);
}
