/* styles/winner/winner-animate-pop.css
   3D pop-out winner text overlay
*/

.sc-wpop{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 999999; /* must be above your winner modal */
  opacity: 0;
  visibility: hidden;
    background: transparent;

}

.sc-wpop.is-on{
  opacity: 1;
  visibility: visible;
}

.sc-wpop__text{
  --accent: var(--sc-wpop-accent, #4f8cff);

  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  padding: 0 18px;

  /* big & responsive */
  font-size: clamp(52px, 9.5vw, 140px);

  line-height: 1.02;

  /* premium gradient text */
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, var(--accent) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* depth */
  text-shadow:
    0 14px 40px rgba(0,0,0,.45),
    0 0 18px rgba(79,140,255,.18);

 will-change: transform, opacity;
transform-origin: 50% 50%;
backface-visibility: hidden;


  display: inline-block;              /* prevents full-width background blocks */
  background-repeat: no-repeat;
  -webkit-text-fill-color: transparent; /* CRITICAL when using text-stroke */
  background-color: transparent;
  background-size: 100% 100%;



}

.sc-wpop.is-on .sc-wpop__text{
  animation: scWinnerPop 3600ms linear both;

}

@keyframes scWinnerPop{
  0%{
    opacity: 1;
    filter: blur(0);
    transform: perspective(1000px) translateZ(-420px) scale(.22);
  }

  /* ✅ stay fully visible until the VERY end */
  99.4%{
    opacity: 1;
    filter: blur(0);
  }

  /* ✅ only "destroy" it after it’s already huge / off-screen */
  100%{
    opacity: 0;
    filter: blur(0);
    transform: perspective(1000px) translateZ(2400px) scale(10.8);
  }
}




/* Light theme: make it readable on white */
html[data-theme="light"] .sc-wpop__text{
  background: linear-gradient(180deg, rgba(10,10,16,0.95) 0%, var(--accent) 120%);
  -webkit-text-stroke: 1px rgba(0,0,0,0.08);
  text-shadow:
    0 14px 36px rgba(0,0,0,.22),
    0 0 18px rgba(79,140,255,.12);
      -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

}

@media (prefers-reduced-motion: reduce){
  .sc-wpop.is-on .sc-wpop__text{
    animation: none;
    opacity: 1;
    transform: none;
  }
  .sc-wpop{
    opacity: 1;
    visibility: visible;
  }
}
