/* Vave Wheel of Fortune: donor-matched sidebar trigger, game modal and win state. */
.vave-side-wheel {
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.vave-side-wheel-frame {
  transform-origin: 50% 50%;
  animation: vave-sidebar-wheel-frame 7s ease-in-out infinite;
}

.vave-side-wheel-disc {
  transform-origin: 50% 50%;
  animation: vave-sidebar-wheel-disc 10s linear infinite;
}

@keyframes vave-sidebar-wheel-frame {
  0%, 100% { transform: rotate(-5deg) scale(1); }
  50% { transform: rotate(5deg) scale(1.04); }
}

@keyframes vave-sidebar-wheel-disc {
  to { transform: rotate(360deg); }
}

body.vave-wof-open {
  overflow: hidden;
}

.vave-wof-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: auto;
  background: rgba(4, 17, 24, 0.76);
  opacity: 0;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: opacity 180ms ease;
}

.vave-wof-overlay[hidden] {
  display: none;
}

.vave-wof-overlay.is-visible {
  opacity: 1;
}

.vave-wof-dialog {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  min-height: min(683px, calc(100dvh - 32px));
  overflow: hidden;
  color: #fff;
  background: #2d3d46;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  transform: translateY(10px) scale(0.985);
  transition:
    width 240ms cubic-bezier(0.32, 0.72, 0, 1),
    min-height 240ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
}

.vave-wof-overlay.is-visible .vave-wof-dialog {
  transform: translateY(0) scale(1);
}

.vave-wof-dialog.is-success {
  width: min(432px, calc(100vw - 32px));
  min-height: min(501px, calc(100dvh - 32px));
}

.vave-wof-close {
  position: absolute;
  top: 13px;
  right: 15px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #f6fbfc;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font: 300 37px/1 Arial, sans-serif;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.vave-wof-close:hover,
.vave-wof-close:focus-visible {
  color: #22c99d;
  background: rgba(255, 255, 255, 0.06);
  transform: rotate(5deg);
}

.vave-wof-close:focus-visible,
.vave-wof-primary:focus-visible,
.vave-wof-center:focus-visible {
  outline: 2px solid #eafff9;
  outline-offset: 2px;
}

.vave-wof-game {
  min-height: 681px;
  padding: 55px 28px 24px;
}

.vave-wof-game[hidden],
.vave-wof-success[hidden] {
  display: none;
}

.vave-wof-game h2 {
  position: relative;
  z-index: 5;
  margin: 0;
  color: #fff;
  font-size: 31px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.vave-wof-stage {
  position: relative;
  height: 476px;
  margin-top: -1px;
  isolation: isolate;
}

.vave-wof-stage-effect,
.vave-wof-firefly {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.vave-wof-stage-effect {
  top: 50%;
  left: 50%;
  z-index: -4;
  width: 660px;
  max-width: 100%;
  transform: translate(-50%, -50%);
  opacity: 0.68;
}

.vave-wof-firefly {
  top: 50%;
  left: 50%;
  z-index: -2;
  width: 310px;
  opacity: 0.28;
}

.vave-wof-firefly--one {
  transform: translate(-98%, -53%);
  animation: vave-wof-firefly-one 15s linear infinite;
}

.vave-wof-firefly--two {
  transform: translate(-3%, -49%) scaleX(-1);
  animation: vave-wof-firefly-two 15s linear infinite;
}

.vave-wof-wheel-shell {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 430px;
  height: 430px;
  transform: translate(-50%, -49%);
}

.vave-wof-wheel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 375px;
  height: 375px;
  overflow: hidden;
  border: 2px solid rgba(1, 27, 31, 0.88);
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -16.363deg, rgba(0, 24, 29, 0.78) 0deg 1.25deg, transparent 1.25deg 32.727deg),
    conic-gradient(
      from -16.363deg,
      #08736f 0deg 32.727deg,
      #064c4d 32.727deg 65.454deg,
      #08706d 65.454deg 98.181deg,
      #064e50 98.181deg 130.908deg,
      #087672 130.908deg 163.635deg,
      #d99600 163.635deg 196.362deg,
      #075d5e 196.362deg 229.089deg,
      #063f43 229.089deg 261.816deg,
      #075f5e 261.816deg 294.543deg,
      #06474a 294.543deg 327.27deg,
      #08736f 327.27deg 360deg
    );
  box-shadow:
    inset 0 0 45px rgba(0, 0, 0, 0.52),
    0 0 34px rgba(20, 218, 166, 0.2);
  transform: translate(-50%, -50%) rotate(0deg);
  will-change: transform;
}

.vave-wof-wheel.is-idle {
  animation: vave-wof-idle 2s ease-in-out infinite;
}

.vave-wof-wheel.is-spinning {
  animation: none;
}

.vave-wof-sector {
  position: absolute;
  top: calc(50% - 16px);
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 48%;
  height: 32px;
  padding-left: 59px;
  gap: 7px;
  color: #effbfa;
  transform: rotate(calc(-90deg + (var(--sector) * 32.727deg)));
  transform-origin: 0 50%;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.vave-wof-sector img {
  order: -1;
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.vave-wof-sector--btc {
  color: #fff;
}

.vave-wof-wheel-frame {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.vave-wof-rim-lights {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.vave-wof-rim-lights i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px;
  background: #fff;
  border-radius: 50%;
  transform: rotate(calc(var(--light) * 24deg)) translateY(-197px);
  animation: vave-wof-light-pulse 1.5s ease-in-out infinite;
  animation-delay: calc(var(--light) * -100ms);
}

.vave-wof-arrow {
  position: absolute;
  top: -8px;
  left: 50%;
  z-index: 8;
  width: 58px;
  height: 64px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 8px rgba(34, 201, 157, 0.55));
  animation: vave-wof-arrow-bob 2s ease-in-out infinite;
  pointer-events: none;
}

.vave-wof-center {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 9;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  animation: vave-wof-center-pulse 2s ease-in-out infinite;
}

.vave-wof-center img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.vave-wof-center span {
  position: relative;
  z-index: 1;
  font-size: 21px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
}

.vave-wof-center:disabled {
  cursor: wait;
}

.vave-wof-coin,
.vave-wof-star {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

.vave-wof-coin {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25));
  animation: vave-wof-coin-float 6s ease-in-out infinite;
}

.vave-wof-coin--one { top: 212px; left: -13px; animation-duration: 3s; }
.vave-wof-coin--two { top: 35px; left: 1px; animation-delay: -2s; }
.vave-wof-coin--three { top: 171px; right: -14px; animation-delay: -3.5s; }
.vave-wof-coin--four { right: -6px; bottom: 13px; animation-duration: 3s; animation-delay: -1s; }

.vave-wof-star {
  width: 24px;
  height: 24px;
  object-fit: contain;
  animation: vave-wof-star-drift 5s ease-in-out infinite;
}

.vave-wof-star--1 { top: 10px; left: 109px; }
.vave-wof-star--2 { top: 77px; right: 82px; animation-duration: 4s; }
.vave-wof-star--3 { top: 213px; left: 12px; animation-duration: 6s; }
.vave-wof-star--4 { right: 22px; bottom: 101px; animation-duration: 8s; }
.vave-wof-star--5 { bottom: 38px; left: 92px; animation-duration: 4s; }
.vave-wof-star--6 { right: 105px; bottom: 22px; animation-duration: 6s; }

.vave-wof-actions {
  position: relative;
  z-index: 7;
  display: grid;
  grid-template-columns: 1fr 176px 1fr;
  align-items: center;
  gap: 20px;
  margin-top: -3px;
  padding-inline: 39px;
  color: #22c99d;
  font-size: 14px;
  font-weight: 600;
}

.vave-wof-actions > span {
  text-align: left;
}

.vave-wof-actions > a {
  color: #22c99d;
  text-align: right;
  text-decoration: none;
}

.vave-wof-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  color: #fff;
  background: #29c6a2;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(15, 111, 91, 0.22);
  cursor: pointer;
  font: 700 14px/1 Arial, sans-serif;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.vave-wof-primary:hover,
.vave-wof-primary:focus-visible {
  color: #fff;
  background: #35d5af;
  box-shadow: 0 10px 24px rgba(34, 201, 157, 0.3);
  transform: translateY(-1px);
}

.vave-wof-primary:active {
  transform: scale(0.98);
}

.vave-wof-primary:disabled {
  opacity: 0.58;
  cursor: wait;
}

.vave-wof-success {
  position: relative;
  min-height: 499px;
  overflow: hidden;
  padding: 31px 24px 24px;
  text-align: center;
  background: #1a2a34;
}

.vave-wof-success::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/vave/wof/wof-bg-effect-success-modal.webp") center / cover no-repeat;
  opacity: 0.42;
  pointer-events: none;
}

.vave-wof-success-rays {
  position: absolute;
  inset: 110px -90px -90px;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.045) 0deg 8deg, transparent 8deg 18deg);
  mask-image: radial-gradient(circle, #000 0%, transparent 73%);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 73%);
  animation: vave-wof-success-rays 16s linear infinite;
}

.vave-wof-marquee {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 289px;
  height: 125px;
  margin: 0 auto;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.vave-wof-marquee strong,
.vave-wof-marquee b {
  position: relative;
  z-index: 2;
  color: #fff;
  font-weight: 800;
  line-height: 1.08;
}

.vave-wof-marquee strong { font-size: 19px; }
.vave-wof-marquee b { margin-top: 4px; font-size: 27px; }

.vave-wof-marquee-lights {
  position: absolute;
  inset: 0;
}

.vave-wof-marquee-lights i {
  position: absolute;
  top: 0;
  left: 0;
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 9px 3px #24e7a9;
  offset-path: inset(10px 13px round 23px);
  offset-distance: calc(var(--bulb) * 5%);
  animation: vave-wof-success-bulb 1.2s ease-in-out infinite;
  animation-delay: calc(var(--bulb) * -80ms);
}

.vave-wof-gift {
  position: relative;
  z-index: 2;
  width: 269px;
  height: 218px;
  margin: -1px auto 0;
}

.vave-wof-gift-box,
.vave-wof-gift-stars {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
}

.vave-wof-gift-box {
  z-index: 2;
  width: 205px;
  transform: translate(-50%, -51%);
  filter: drop-shadow(0 14px 24px rgba(13, 195, 158, 0.2));
  animation: vave-wof-gift-float 2.6s ease-in-out infinite;
}

.vave-wof-gift-stars {
  z-index: 3;
  width: 268px;
  transform: translate(-50%, -50%);
  animation: vave-wof-gift-stars 1.8s ease-in-out infinite;
}

.vave-wof-prize {
  position: relative;
  z-index: 4;
  margin-top: -4px;
  color: #fff;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.48);
}

.vave-wof-claim {
  position: relative;
  z-index: 4;
  min-height: 40px;
  margin-top: 17px;
  padding-inline: 19px;
  font-size: 13px;
}

@keyframes vave-wof-idle {
  0%, 100% { scale: 1; filter: brightness(1); }
  50% { scale: 1.012; filter: brightness(1.08); }
}

@keyframes vave-wof-light-pulse {
  0%, 100% { opacity: 0.95; background: #fff; box-shadow: none; }
  50% { opacity: 1; background: #4cffc1; box-shadow: 0 0 10px 4px rgba(35, 239, 171, 0.92); }
}

@keyframes vave-wof-arrow-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(4px); }
}

@keyframes vave-wof-center-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
  50% { transform: translate(-50%, -50%) scale(1.04); filter: brightness(1.12); }
}

@keyframes vave-wof-coin-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-9px) rotate(5deg); }
}

@keyframes vave-wof-star-drift {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(0.82); opacity: 0.55; }
  50% { transform: translateY(-8px) rotate(22deg) scale(1.08); opacity: 1; }
}

@keyframes vave-wof-firefly-one {
  to { transform: translate(-98%, -53%) rotate(360deg); }
}

@keyframes vave-wof-firefly-two {
  to { transform: translate(-3%, -49%) scaleX(-1) rotate(-360deg); }
}

@keyframes vave-wof-success-bulb {
  0%, 100% { opacity: 0.45; scale: 0.8; }
  50% { opacity: 1; scale: 1.22; }
}

@keyframes vave-wof-gift-float {
  0%, 100% { transform: translate(-50%, -51%) translateY(0) rotate(-1deg); }
  50% { transform: translate(-50%, -51%) translateY(-9px) rotate(1deg); }
}

@keyframes vave-wof-gift-stars {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.94); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes vave-wof-success-rays {
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .vave-wof-overlay {
    align-items: center;
    padding: 10px;
  }

  .vave-wof-dialog {
    width: min(540px, calc(100vw - 20px));
    min-height: 0;
  }

  .vave-wof-game {
    min-height: 0;
    padding: 48px 12px 20px;
  }

  .vave-wof-game h2 {
    padding-inline: 26px;
    font-size: clamp(20px, 6vw, 27px);
  }

  .vave-wof-stage {
    height: min(72vw, 420px);
    min-height: 300px;
  }

  .vave-wof-wheel-shell {
    width: min(82vw, 390px);
    height: min(82vw, 390px);
  }

  .vave-wof-wheel {
    width: calc(min(82vw, 390px) * 0.872);
    height: calc(min(82vw, 390px) * 0.872);
  }

  .vave-wof-rim-lights i {
    transform: rotate(calc(var(--light) * 24deg)) translateY(calc(min(82vw, 390px) * -0.457));
  }

  .vave-wof-sector {
    padding-left: calc(min(82vw, 390px) * 0.13);
    gap: 4px;
    font-size: clamp(8px, 2.3vw, 10px);
  }

  .vave-wof-sector img {
    width: 19px;
    height: 19px;
  }

  .vave-wof-arrow {
    width: 50px;
    height: 56px;
  }

  .vave-wof-center {
    width: 74px;
    height: 74px;
  }

  .vave-wof-center span {
    font-size: 18px;
  }

  .vave-wof-coin {
    display: none;
  }

  .vave-wof-actions {
    grid-template-columns: 1fr 132px 1fr;
    gap: 10px;
    padding-inline: 8px;
    font-size: 11px;
  }

  .vave-wof-primary {
    min-height: 44px;
  }
}

@media (max-width: 430px) {
  .vave-wof-game {
    padding-top: 44px;
  }

  .vave-wof-stage {
    height: 320px;
  }

  .vave-wof-actions {
    grid-template-columns: 1fr 1fr;
    padding-inline: 4px;
  }

  .vave-wof-actions > span {
    order: 2;
    text-align: center;
  }

  .vave-wof-actions > a {
    order: 3;
    text-align: center;
  }

  .vave-wof-primary {
    grid-column: 1 / -1;
  }

  .vave-wof-dialog.is-success {
    width: min(360px, calc(100vw - 20px));
    min-height: 458px;
  }

  .vave-wof-success {
    min-height: 456px;
    padding-top: 28px;
  }

  .vave-wof-gift {
    height: 185px;
  }

  .vave-wof-gift-box {
    width: 175px;
  }

  .vave-wof-prize {
    font-size: 33px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vave-side-wheel-frame,
  .vave-side-wheel-disc,
  .vave-wof-wheel,
  .vave-wof-rim-lights i,
  .vave-wof-arrow,
  .vave-wof-center,
  .vave-wof-coin,
  .vave-wof-star,
  .vave-wof-firefly,
  .vave-wof-marquee-lights i,
  .vave-wof-gift-box,
  .vave-wof-gift-stars,
  .vave-wof-success-rays {
    animation: none;
  }

  .vave-wof-overlay,
  .vave-wof-dialog,
  .vave-wof-primary,
  .vave-wof-close {
    transition-duration: 0.01ms;
  }
}
