/* =====================================================
   Winning cup pop-up (js/wincup.js) - sea blue, purple and white
   ===================================================== */
.wc {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 50% 52%, rgba(124, 58, 237, 0.55) 0%, rgba(10, 110, 168, 0.25) 38%, rgba(6, 12, 28, 0.9) 70%),
    rgba(6, 12, 28, 0.82);
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.wc.show { opacity: 1; }

/* Light rays turning slowly behind the cup */
.wc-rays {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 150vmax;
  height: 150vmax;
  margin: -75vmax 0 0 -75vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.10) 0deg 8deg, transparent 8deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  animation: wc-spin 24s linear infinite;
  pointer-events: none;
}
@keyframes wc-spin { to { transform: rotate(360deg); } }

/* Confetti */
.wc-confetti { position: absolute; inset: 0; pointer-events: none; }
.wc-confetti i {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  opacity: 0.95;
  animation: wc-fall linear infinite;
}
@keyframes wc-fall {
  0% { transform: translateY(-20px) rotate(0deg); }
  100% { transform: translateY(110vh) rotate(var(--turn)); }
}

.wc-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.wc-body {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(100%, 420px);
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.wc.show .wc-body { transform: scale(1); }
.wc-rank { margin: 0; max-width: 18em; font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
.wc-rank b { color: #c4b5fd; }
.wc-title {
  margin: 4px 0 0;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: clamp(3.2rem, 17vw, 4.6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #ffffff 30%, #d9ccff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 6px 30px rgba(124, 58, 237, 0.45);
}
.wc-amount { margin: 0; font-size: clamp(1.8rem, 9vw, 2.4rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.wc-cup { width: min(62vw, 250px); margin: 8px 0 4px; filter: drop-shadow(0 0 28px rgba(167, 139, 250, 0.75)); animation: wc-float 3s ease-in-out infinite; }
.wc-cup-art { display: block; width: 100%; height: auto; }
@keyframes wc-float { 50% { transform: translateY(-8px); } }
.wc-verify { margin: 4px 0 0; font-weight: 600; }
.wc-verify b { color: #8fd3ff; letter-spacing: 0.04em; }
.wc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin-top: 10px; }
.wc-btn {
  min-height: 52px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(115deg, #0a6ea8 0%, #3b52c9 55%, #7c3aed 100%);
  color: #fff;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
  cursor: pointer;
}
.wc-btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px #a78bfa; color: #e9e2ff; }
.wc-brand {
  margin-top: 14px;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.01em;
}
.wc-brand span { color: #c4b5fd; }

@media (prefers-reduced-motion: reduce) {
  .wc-rays, .wc-cup, .wc-confetti i { animation: none; }
  .wc-confetti { display: none; }
}
