* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Root wrapper for the shortcode */
.wad-game-container {
  width: 100%;
  background: #050508;
  color: #f8f8ff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  min-height: 420px;
}

/* Small credit */
.wad-powered {
  text-align: center;
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
  color: #9ca3af;
}

/* Game frame */
.game-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  min-height: 520px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle at top, #151528 0%, #050508 60%, #000000 100%);
  box-shadow: 0 0 40px rgba(0,0,0,0.7);
  border: 1px solid rgba(0, 255, 180, 0.25);
}

/* HUD */

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.9),
    rgba(0,0,0,0.5),
    transparent
  );
  z-index: 20;
  font-size: 14px;
  text-shadow: 0 0 8px rgba(0, 255, 200, 0.7);
}
.hud-group {
  display: flex;
  gap: 16px;
  align-items: center;
}
.hud-label {
  opacity: 0.7;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hud-value {
  font-weight: 700;
  font-size: 16px;
}
.hud-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 180, 0.4);
  background: rgba(0, 0, 0, 0.6);
}
.discount-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: radial-gradient(circle at top left, #27fbb6, #00b0ff);
  color: #021015;
  font-weight: 800;
  font-size: 16px;
  box-shadow:
    0 0 14px rgba(0, 255, 180, 0.6),
    0 0 40px rgba(0, 140, 255, 0.3);
  text-shadow: none;
}

/* Progress bar */

.progress-wrapper {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 68px;
  z-index: 5;
}
.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  opacity: 0.7;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.progress-track {
  position: relative;
  width: 100%;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at top, #0b1016, #020406);
  overflow: hidden;
  box-shadow:
    0 0 10px rgba(0, 255, 200, 0.35),
    inset 0 0 10px rgba(0, 0, 0, 0.9);
}
.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #06f0c0, #00b7ff, #ff3bd4);
  box-shadow: 0 0 14px rgba(0, 255, 200, 0.9);
  transition: width 0.15s ease-out;
  z-index: 1;
}
.progress-markers {
  position: absolute;
  inset: 4px;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}
.progress-marker {
  width: 1px;
  background: rgba(255,255,255,0.25);
  opacity: 0.8;
}
.progress-segments {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 3;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.progress-segment {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.8);
  border-right: 1px solid rgba(255,255,255,0.1);
  padding: 0 3px;
  text-shadow: 0 0 4px rgba(0,0,0,0.9);
}
.progress-segment:last-child {
  border-right: none;
}
.progress-segment span {
  font-weight: 700;
}
.progress-segment.filled {
  color: #021015;
  text-shadow: 0 0 10px rgba(255,255,255,0.7);
}
.progress-segment.flash {
  animation: segmentFlash 0.5s ease-out;
}
@keyframes segmentFlash {
  0%   { transform: scale(1);   opacity: 0.7; }
  50%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1);   opacity: 0.9; }
}

/* Playfield */

.playfield {
  position: absolute;
  inset: 0;
  padding: 130px 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 10;
}
.holes-grid {
  width: 100%;
  height: 100%;
  max-height: 430px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  pointer-events: none;
}

.hole {
  position: relative;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}

.hole-base {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 75%;
  height: 20%;
  border-radius: 50%;
  background: radial-gradient(circle at top, #111119 0%, #050508 55%, #000000 100%);
  box-shadow:
    0 0 16px rgba(0, 255, 160, 0.4),
    0 10px 16px rgba(0, 0, 0, 0.9) inset;
  border: 2px solid rgba(0, 255, 200, 0.25);
  filter: drop-shadow(0 0 10px rgba(0, 255, 200, 0.3));
  transition: box-shadow 0.1s ease-out, transform 0.1s ease-out;
}
.hole.hit .hole-base {
  box-shadow:
    0 0 24px rgba(39, 251, 182, 0.9),
    0 0 40px rgba(0, 140, 255, 0.8);
  transform: translateX(-50%) scale(1.05);
}

/* Mole */

.mole {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translate(-50%, 100%) scale(0.35);
  width: 180%;
  max-width: 320px;
  transition: transform 0.15s ease-out;
  pointer-events: auto;
  user-select: none;
}
.mole img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 0 10px rgba(0, 255, 160, 0.7));
}

.mole.hidden {
  pointer-events: none;
  transform: translate(-50%, 100%) scale(0.35);
  opacity: 0;
}
.mole.up {
  opacity: 1;
  transform: translate(-50%, 0%) scale(0.85);
}
.mole.hit {
  animation: moleHit 0.2s ease-out forwards;
}

/* Golden mole */

.mole.golden img {
  filter:
    drop-shadow(0 0 16px rgba(255, 215, 0, 1))
    saturate(1.4)
    brightness(1.2);
}
.hole.golden .hole-base {
  box-shadow:
    0 0 26px rgba(255, 215, 0, 0.9),
    0 10px 18px rgba(0, 0, 0, 0.9) inset;
  border-color: rgba(255, 215, 0, 0.7);
}

@keyframes moleHit {
  0% { transform: translate(-50%, 0%) scale(0.85); filter: brightness(1); }
  40% { transform: translate(-50%, 10%) scale(0.6); filter: brightness(1.4); }
  100% { transform: translate(-50%, 100%) scale(0.3); filter: brightness(0.6); opacity: 0; }
}

/* Hit score pop */

.hit-pop {
  position: absolute;
  left: 50%;
  bottom: 45%;
  transform: translateX(-50%);
  font-size: 22px;
  font-weight: 900;
  color: #27fbb6;
  text-shadow:
    0 0 10px rgba(39, 251, 182, 0.9),
    0 0 20px rgba(0, 160, 255, 0.9);
  opacity: 0;
  pointer-events: none;
}
.hit-pop.show {
  animation: popScore 0.5s ease-out forwards;
}
.hit-pop.golden-text {
  color: #ffd75a;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 1),
    0 0 24px rgba(255, 180, 0, 0.9);
}
@keyframes popScore {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.7); }
  20% { opacity: 1; transform: translate(-50%, -4px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -30px) scale(0.8); }
}

/* Overlays */

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.9)
  );
  z-index: 25;
  padding: 20px;
  pointer-events: none;
}
.overlay-inner {
  pointer-events: auto;
  background: transparent;
  border-radius: 0;
  padding: 0;
  max-width: 480px;
  text-align: center;
}
.overlay h1 {
  font-size: 32px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow:
    0 0 18px rgba(0, 255, 200, 0.9),
    0 0 30px rgba(0, 140, 255, 0.9);
  margin-bottom: 6px;
}
.overlay p {
  font-size: 14px;
  opacity: 0.85;
  max-width: 420px;
  margin: 0 auto 8px;
}

.btn {
  margin-top: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: radial-gradient(circle at top left, #27fbb6, #0084ff);
  color: #021015;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow:
    0 0 18px rgba(0, 255, 200, 0.85),
    0 0 40px rgba(0, 132, 255, 0.6);
}
.btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow:
    0 0 10px rgba(0, 255, 200, 0.6),
    0 0 26px rgba(0, 132, 255, 0.4);
}

/* Final prize styling */

.prize-amount {
  font-size: 34px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-shadow:
    0 0 24px rgba(39, 251, 182, 1),
    0 0 40px rgba(0, 140, 255, 0.9);
  animation: prizePulse 1.2s ease-in-out infinite;
  color: #27fbb6;
}
.prize-amount.golden-prize {
  color: #ffd75a;
  text-shadow:
    0 0 22px rgba(255, 215, 0, 1),
    0 0 40px rgba(255, 170, 0, 0.9);
}
@keyframes prizePulse {
  0%   { transform: scale(1);   opacity: 1; }
  50%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}

/* Email gate */

.email-gate {
  margin-top: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-out;
}
.email-gate.visible {
  opacity: 1;
  pointer-events: auto;
}
.email-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-bottom: 6px;
}
.email-input {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 200, 0.6);
  background: rgba(0,0,0,0.7);
  color: #f8f8ff;
  min-width: 220px;
}
.email-input:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(0,255,200,0.8);
}
.countdown-text {
  font-size: 12px;
  opacity: 0.9;
}
.countdown-time {
  font-weight: 700;
}
.error-text {
  margin-top: 4px;
  font-size: 12px;
  color: #ff6b9b;
  min-height: 16px;
}

/* Confetti */

.confetti-canvas {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

/* Golden bonus banner + fireworks */

.golden-bonus {
  margin-top: 12px;
  position: relative;
  display: inline-block;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.golden-bonus.show {
  opacity: 1;
  transform: scale(1);
}
.golden-bonus-text {
  font-size: 18px;
  font-weight: 900;
  color: #ffd75a;
  text-shadow:
    0 0 16px rgba(255, 215, 0, 1),
    0 0 30px rgba(255, 170, 0, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.golden-firework {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle, #fff4c2, #ffd75a, #ffb100);
  box-shadow:
    0 0 14px rgba(255, 215, 0, 1),
    0 0 28px rgba(255, 170, 0, 0.9);
  opacity: 0;
  transform: scale(0.4);
  animation: goldenBurst 1.2s ease-out infinite;
}
.golden-firework.fw1 { top: -6px;  left: -24px;  animation-delay: 0s; }
.golden-firework.fw2 { top: -10px; right: -22px; animation-delay: 0.2s; }
.golden-firework.fw3 { bottom: -8px; left: -14px; animation-delay: 0.4s; }
.golden-firework.fw4 { bottom: -10px; right: -18px; animation-delay: 0.6s; }

@keyframes goldenBurst {
  0%   { opacity: 0;   transform: scale(0.3); }
  40%  { opacity: 1;   transform: scale(1);   }
  100% { opacity: 0;   transform: scale(1.4); }
}

/* Golden tier up flash */

.prize-amount.tier-up {
  animation: tierFlash 0.9s ease-out;
}
@keyframes tierFlash {
  0%   { text-shadow: 0 0 10px rgba(255,215,0,0.8), 0 0 20px rgba(255,170,0,0.7); transform: scale(1); }
  40%  { text-shadow: 0 0 26px rgba(255,215,0,1),   0 0 40px rgba(255,170,0,0.9); transform: scale(1.12); }
  100% { text-shadow: 0 0 18px rgba(39,251,182,1),  0 0 30px rgba(0,140,255,0.9); transform: scale(1); }
}

/* Mobile tweaks */

@media (max-width: 768px) {
  .wad-game-container {
    padding: 0;
    min-height: 380px;
  }

  .game-wrapper {
    width: 100%;
    max-width: 100%;
    min-height: 460px;
    border-radius: 0;
  }

  .playfield {
    padding: 130px 18px 28px;
  }

  .holes-grid {
    max-height: none;
    gap: 14px;
  }

  .hud-value {
    font-size: 14px;
  }

  .discount-pill {
    font-size: 14px;
  }
}


/* Global countdown bar that follows the shopper */
#wadGlobalCountdownBar.wad-countdown-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: linear-gradient(90deg, #2cb618, #00e0ff);
  color: #050508;
  padding: 8px 14px;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.55);
  font-size: 14px;
}

#wadGlobalCountdownBar .wad-countdown-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#wadGlobalCountdownBar .wad-countdown-label {
  font-weight: 600;
}

#wadGlobalCountdownBar .wad-countdown-timer {
  font-weight: 700;
}

#wadGlobalCountdownBar .wad-countdown-cart-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 600;
  cursor: pointer;
  background: #050508;
  color: #f8f8ff;
}


/* Loyalty summary + title styling */
.loyalty-summary {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #7cf8ff;
  text-shadow: 0 0 6px rgba(0, 255, 255, 0.5);
}

.wad-title {
  text-align: center;
  margin-bottom: 8px;
}

.wad-title-kicker {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ea4ff;
  margin-bottom: 4px;
}

.wad-title-main {
  display: inline-block;
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(90deg, #3cf1ff, #34f5c5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 8px rgba(52, 245, 197, 0.6);
}

.start-loyalty-note {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #7cf8ff;
}


@media (max-width: 600px) {
  .game-wrapper {
    max-width: 100vw;
    box-sizing: border-box;
  }

  .overlay-inner {
    max-width: 100%;
    padding: 12px;
  }

  .overlay p {
    max-width: 100%;
  }
}


/* Temporarily hide all loyalty UI elements on the front-end for v1 launch */
#wadLoyaltyChip,
#wadLoyaltySummary,
#wadStartLoyaltyNote {
  display: none !important;
}
