/* Stakewinz win celebration — original design */
body.sw-win-open { overflow: hidden; }

.sw-win-celebration {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}

.sw-win-celebration.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sw-win-celebration__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 15, .82);
  backdrop-filter: blur(6px);
}

.sw-win-celebration__dialog {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  outline: 0;
}

.sw-win-celebration__close {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--sw-bg-deep);
  color: var(--sw-text);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  font-size: 16px;
}

.sw-win-card {
  position: relative;
  overflow: hidden;
  padding: 30px 24px 22px;
  text-align: center;
  color: #fff;
  border-radius: 18px;
  border: 1px solid rgba(255, 229, 0, .3);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 229, 0, .16), transparent 46%),
    linear-gradient(165deg, #1c3c4a 0%, #0d2030 68%, #0a1926 100%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(0, 199, 100, .12),
    0 0 70px rgba(255, 229, 0, .12);
}

.sw-win-celebration.is-open .sw-win-card {
  animation: sw-win-pop .5s cubic-bezier(.22, .9, .3, 1.15) both;
}

@keyframes sw-win-pop {
  from { transform: scale(.82) translateY(12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.sw-win-card__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sw-win-card__confetti i {
  position: absolute;
  top: -14px;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  opacity: 0;
  animation: sw-win-fall var(--sw-win-dur, 3s) linear infinite;
}

@keyframes sw-win-fall {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translateY(480px) rotate(340deg); opacity: 0; }
}

.sw-win-card__ring {
  position: relative;
  width: 122px;
  height: 122px;
  margin: 6px auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--sw-green);
  background: radial-gradient(circle, rgba(0, 199, 100, .26), rgba(0, 199, 100, .06) 62%, transparent 72%);
  box-shadow: 0 0 0 7px rgba(0, 199, 100, .16), 0 0 46px rgba(0, 199, 100, .4);
  animation: sw-win-glow 2.8s ease-in-out infinite;
}

@keyframes sw-win-glow {
  0%, 100% { box-shadow: 0 0 0 7px rgba(0, 199, 100, .16), 0 0 46px rgba(0, 199, 100, .35); }
  50% { box-shadow: 0 0 0 10px rgba(0, 199, 100, .1), 0 0 70px rgba(0, 199, 100, .55); }
}

.sw-win-card__cup {
  width: 66px;
  height: 66px;
  color: var(--sw-yellow);
  filter: drop-shadow(0 10px 22px rgba(255, 229, 0, .4));
}

.sw-win-card__badge {
  position: absolute;
  right: -6px;
  bottom: 2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--sw-green);
  border: 2px solid #0c7d42;
  box-shadow: 0 0 0 3px rgba(0, 199, 100, .22);
}
.sw-win-card__badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sw-win-card__eyebrow {
  display: block;
  color: var(--sw-yellow);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sw-win-card__title {
  margin: 6px 0 8px;
  font-size: 40px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: .02em;
}

.sw-win-card__amount {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--sw-muted);
}

.sw-win-card__amount strong {
  display: block;
  margin-top: 2px;
  font-size: 34px;
  font-weight: 950;
  color: #fff;
}

.sw-win-card__amount .sw-win-currency {
  color: var(--sw-yellow);
}

.sw-win-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.sw-win-card__stats span {
  padding: 9px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  color: var(--sw-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sw-win-card__stats strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.sw-win-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sw-win-card__btn {
  min-height: 44px;
  border: 1px solid var(--sw-green);
  border-radius: 8px;
  font-weight: 950;
  font-size: 14px;
  cursor: pointer;
}

.sw-win-card__btn--ghost { color: var(--sw-green); background: transparent; }
.sw-win-card__btn--ghost:hover { background: rgba(0, 199, 100, .08); }
.sw-win-card__btn--base { color: #101820; background: var(--sw-yellow); border-color: var(--sw-yellow); }
.sw-win-card__btn--base:hover { filter: brightness(1.05); }

.sw-win-card__foot {
  margin: 14px 0 0;
  font-size: 11px;
  color: var(--sw-muted);
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sw-win-card__confetti i { display: none; }
  .sw-win-card__ring,
  .sw-win-celebration.is-open .sw-win-card { animation: none; }
}

@media (max-width: 359px) {
  .sw-win-celebration { padding: 12px; }
  .sw-win-card { padding: 24px 16px 18px; }
  .sw-win-card__title { font-size: 32px; }
  .sw-win-card__amount strong { font-size: 28px; }
  .sw-win-card__ring { width: 104px; height: 104px; }
  .sw-win-card__cup { width: 56px; height: 56px; }
}
