/* ═══════════════════════════════════════════════════════════════════════
   泊樂娛樂城 · iwinbet 幸運轉盤彈窗  (prefix: whl-)
   self-contained · 與其他站不共用 class / 配色 / 機制
   ═══════════════════════════════════════════════════════════════════════ */

.whl-promo-active {
  padding-bottom: clamp(86px, 17vw, 128px);
}

.whl-footer-promo,
.whl-backdrop {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
}
.whl-footer-promo *,
.whl-backdrop * { box-sizing: border-box; }

/* ── Footer banner ────────────────────────────────────────────────── */
.whl-footer-promo {
  position: fixed;
  z-index: 2147483000;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid rgba(245, 210, 100, 0.45);
  border-radius: 10px;
  background: #05070c;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.44);
  overflow: hidden;
  transform: translateY(18px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}
.whl-footer-promo.is-visible { transform: translateY(0); opacity: 1; }
.whl-footer-promo a { display: block; min-height: 64px; }
.whl-footer-promo img { display: block; width: 100%; height: auto; }

.whl-footer-text {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 46px 14px 16px;
  color: #fff; font-size: 15px; font-weight: 700; flex-wrap: wrap; text-decoration: none;
}
.whl-footer-badge {
  padding: 2px 8px; border-radius: 999px; background: #ff4444;
  color: #fff; font-size: 12px; font-weight: 800;
}
.whl-footer-cta-pill {
  padding: 4px 12px; border-radius: 999px;
  background: linear-gradient(180deg, #ffe790, #ff9e2c);
  color: #160d05; font-size: 13px; font-weight: 900; white-space: nowrap;
}

.whl-footer-close,
.whl-close {
  position: absolute; z-index: 2; display: grid; place-items: center;
  width: 34px; height: 34px; border: 0; border-radius: 999px;
  color: #fff; background: rgba(0, 0, 0, 0.62); cursor: pointer;
  font-size: 22px; line-height: 1;
}
.whl-footer-close { top: 6px; right: 6px; }

/* ── Backdrop ─────────────────────────────────────────────────────── */
.whl-backdrop {
  position: fixed; inset: 0; z-index: 2147483001;
  display: grid; place-items: center; padding: 18px;
  background: rgba(5, 8, 18, 0.66);
  opacity: 0; transition: opacity 180ms ease;
}
.whl-backdrop.is-visible { opacity: 1; }

/* ── Card ─────────────────────────────────────────────────────────── */
.whl-card {
  position: relative;
  width: min(94vw, 420px);
  max-height: min(92vh, 760px);
  display: flex;
  flex-direction: column;
  color: #fff;
  border: 1px solid rgba(245, 210, 100, 0.42);
  border-radius: 16px;
  background:
    radial-gradient(circle at 82% 6%, rgba(245, 210, 100, 0.26), transparent 30%),
    linear-gradient(160deg, #14102e 0%, #2a1769 52%, #0b0a1c 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: translateY(14px) scale(0.985);
  transition: transform 180ms ease;
}
.whl-backdrop.is-visible .whl-card { transform: translateY(0) scale(1); }
.whl-close { top: 10px; right: 10px; }

/* ── Sticky header ────────────────────────────────────────────────── */
.whl-head {
  flex: none;
  padding: 16px 18px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}
.whl-brand { font-size: 18px; font-weight: 900; letter-spacing: 0.5px; color: #ffe89b; }
.whl-sub   { margin-top: 4px; font-size: 12.5px; color: rgba(255, 255, 255, 0.78); }

/* ── Scrollable body ──────────────────────────────────────────────── */
.whl-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 18px 8px;
}
.whl-cap {
  text-align: center; font-size: 13px; line-height: 1.6;
  color: rgba(255, 255, 255, 0.82); margin-bottom: 12px;
}
.whl-cap b { color: #ffd84f; font-weight: 900; }
.whl-cap strong { color: #ffe89b; }

/* ── Wheel stage ──────────────────────────────────────────────────── */
.whl-stage { position: relative; display: grid; place-items: center; }
.whl-wheel-wrap {
  position: relative;
  width: min(78vw, 300px);
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}
.whl-canvas { display: block; border-radius: 50%; }
.whl-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  color: #ff5e5e; font-size: 30px; line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); z-index: 3; pointer-events: none;
}
.whl-spin {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 30%; aspect-ratio: 1 / 1; border-radius: 50%;
  border: 3px solid #fff; cursor: pointer; z-index: 4;
  color: #3a2400; font-size: clamp(14px, 4.5vw, 18px); font-weight: 900;
  background: radial-gradient(circle at 50% 35%, #ffe790, #ff9e2c);
  box-shadow: 0 4px 14px rgba(255, 158, 44, 0.5);
  transition: transform 120ms ease;
}
.whl-spin:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.05); }
.whl-spin:disabled { cursor: default; opacity: 0.92; }

.whl-hint {
  margin-top: 8px; font-size: 12.5px; color: rgba(255, 255, 255, 0.6);
  transition: opacity 200ms ease;
}

/* ── Prize reveal ─────────────────────────────────────────────────── */
.whl-prize {
  position: absolute; inset: 0; display: grid; place-content: center;
  text-align: center; gap: 4px;
  background: radial-gradient(circle at 50% 45%, rgba(20, 16, 46, 0.96), rgba(11, 10, 28, 0.98));
  border-radius: 12px;
  opacity: 0; visibility: hidden; transform: scale(0.9);
  transition: opacity 240ms ease, transform 240ms ease, visibility 240ms;
  z-index: 6;
}
.whl-prize.whl-shown { opacity: 1; visibility: visible; transform: scale(1); }
.whl-congrats { font-size: 16px; font-weight: 800; color: #ffe89b; }
.whl-amount {
  font-size: 64px; font-weight: 900; line-height: 1; color: #ffd84f;
  text-shadow: 0 4px 16px rgba(255, 216, 79, 0.4);
}
.whl-amount small { font-size: 22px; margin-left: 4px; }
.whl-prize-tag { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, 0.82); }

/* ── Confetti ─────────────────────────────────────────────────────── */
.whl-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 7; }
.whl-conf { position: absolute; top: -16px; border-radius: 2px; }
@keyframes whlFall {
  0%   { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(360px) rotate(540deg); opacity: 0; }
}

/* ── 活動總覽 ─────────────────────────────────────────────────────── */
.whl-list-title {
  margin: 18px 0 10px; text-align: center; font-size: 13px; font-weight: 800;
  color: rgba(255, 255, 255, 0.7); letter-spacing: 0.04em;
}
.whl-acts { display: grid; gap: 8px; }
.whl-act {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
}
.whl-act.whl-feat { border-color: rgba(245, 210, 100, 0.5); background: rgba(245, 210, 100, 0.08); }
.whl-badge {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 999px; background: rgba(255, 255, 255, 0.12);
  font-size: 13px; font-weight: 800; color: #ffe89b;
}
.whl-act-main { flex: 1 1 auto; min-width: 0; }
.whl-act-label { font-size: 13.5px; font-weight: 800; }
.whl-tag {
  display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 999px;
  background: #f5d264; color: #3a2400; font-size: 10.5px; font-weight: 800;
}
.whl-act-desc { margin-top: 2px; font-size: 12px; color: rgba(255, 255, 255, 0.66); }
.whl-act-reward { flex: none; font-size: 22px; font-weight: 900; color: #ffd84f; }
.whl-act-reward small { font-size: 11px; color: rgba(255, 255, 255, 0.6); margin-left: 2px; }

/* ── Sticky footer ────────────────────────────────────────────────── */
.whl-foot {
  flex: none;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}
.whl-timer-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.whl-timer-label { font-size: 12px; color: rgba(255, 255, 255, 0.66); }
.whl-timer { display: flex; gap: 6px; }
.whl-tunit {
  min-width: 38px; padding: 4px 0; border-radius: 8px; text-align: center;
  background: rgba(255, 214, 94, 0.14); border: 1px solid rgba(245, 210, 100, 0.3);
}
.whl-tnum { font-size: 17px; font-weight: 900; color: #ffe89b; line-height: 1.1; }
.whl-tlbl { font-size: 10px; color: rgba(255, 255, 255, 0.6); }
.whl-timer-done { font-size: 14px; font-weight: 800; color: #ff8a8a; }

.whl-cta {
  display: flex; align-items: center; justify-content: center;
  min-height: 50px; border-radius: 10px;
  color: #160d05; text-decoration: none;
  background: linear-gradient(180deg, #ffe790, #ff9e2c);
  box-shadow: 0 10px 24px rgba(255, 157, 43, 0.3);
  font-size: 17px; font-weight: 900;
}
.whl-pulse { animation: whlPulse 1.1s ease-in-out 3; }
@keyframes whlPulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 10px 24px rgba(255, 157, 43, 0.3); }
  50%      { transform: scale(1.03); box-shadow: 0 14px 32px rgba(255, 157, 43, 0.55); }
}

.whl-terms { margin: 10px 0 0; font-size: 12px; color: rgba(255, 255, 255, 0.66); }
.whl-terms summary { cursor: pointer; color: rgba(255, 255, 255, 0.78); }
.whl-terms p { margin: 6px 0 0; line-height: 1.55; }
.whl-compliance { margin-top: 8px; text-align: center; font-size: 11.5px; color: rgba(255, 255, 255, 0.6); }

/* ── Mobile: bottom drawer ────────────────────────────────────────── */
@media (max-width: 520px) {
  .whl-promo-active { padding-bottom: clamp(72px, 23vw, 106px); }
  .whl-footer-promo { right: 8px; bottom: 8px; left: 8px; }
  .whl-backdrop { place-items: end center; padding: 0; }
  .whl-card {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
  }
  .whl-backdrop.is-visible .whl-card { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .whl-footer-promo, .whl-backdrop, .whl-card, .whl-prize, .whl-pulse, .whl-conf { transition: none; animation: none; }
}
