.solvefx-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: rgba(0, 0, 0, 0.92);
  animation: solvefx-fade-in 0.15s ease-out;
  cursor: pointer;
}
.solvefx-overlay--fail {
  background: rgba(8, 8, 10, 0.94);
}
.solvefx-overlay.solvefx-out {
  animation: solvefx-fade-out 0.4s ease-in forwards;
  pointer-events: none;
}
.solvefx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}
.solvefx-text {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--solvefx-text-color, #fff);
  font-family: "Exo 2", Raleway, system-ui, sans-serif;
  pointer-events: none;
}
.solvefx-text[hidden] {
  display: none !important;
}
.solvefx-label {
  font-family: "Russo One", Impact, system-ui, sans-serif;
  font-size: clamp(3.2em, 12vw, 7.5em);
  font-weight: 900;
  letter-spacing: 0.1em;
  animation: solvefx-pop 0.45s cubic-bezier(0.34, 1.45, 0.64, 1) both;
  text-shadow: 4px 4px 0 #000;
}
.solvefx-sub {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(1.15em, 2.4vw, 1.85em);
  opacity: 0;
  margin-top: 0.85em;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  animation: solvefx-sub 0.45s 0.3s forwards;
}
.solvefx-tag {
  font-size: clamp(0.85em, 1.3vw, 1.15em);
  opacity: 0;
  margin-top: 0.45em;
  letter-spacing: 0.08em;
  color: var(--solvefx-text-color, #fff);
  animation: solvefx-sub 0.45s 0.5s forwards;
}

/* Single fighter — always centered */
.solvefx-char {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  image-rendering: pixelated;
  animation: solvefx-char-in 0.35s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.solvefx-char img {
  display: block;
  height: clamp(180px, 36vh, 340px);
  width: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.65));
}
.solvefx-char--fail img {
  filter: grayscale(0.55) brightness(0.85) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.65));
}
.solvefx-char--win img {
  filter: drop-shadow(0 0 12px rgba(198, 40, 40, 0.35)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.65));
}

/* Defeat duo — two fighters centered */
.solvefx-char-duo {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 3rem);
  pointer-events: none;
  animation: solvefx-duo-in 0.4s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.solvefx-char-duo .solvefx-char {
  position: static;
  transform: none;
  animation: none;
}
.solvefx-char-duo .solvefx-char img {
  height: clamp(150px, 30vh, 280px);
}
.solvefx-char-duo .solvefx-char:first-child img {
  transform: scaleX(-1);
}

@keyframes solvefx-char-in {
  from { opacity: 0; transform: translate(-50%, -40%) scale(0.85); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes solvefx-duo-in {
  from { opacity: 0; transform: translate(-50%, -40%) scale(0.85); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes solvefx-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes solvefx-fade-out {
  to { opacity: 0; }
}
@keyframes solvefx-pop {
  0% { transform: scale(0.35); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes solvefx-sub {
  to { opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .solvefx-overlay,
  .solvefx-label,
  .solvefx-sub,
  .solvefx-tag,
  .solvefx-char,
  .solvefx-char-duo {
    animation: none !important;
  }
}

/* —— Westlife shootout —— */
.solvefx-overlay--west-win {
  background: rgba(12, 28, 16, 0.94);
}
.solvefx-overlay--west-fail {
  background: rgba(36, 12, 10, 0.95);
}
.solvefx-char--west {
  left: 42%;
}
.solvefx-char--west > img:first-child {
  height: clamp(200px, 42vh, 380px);
  transition: filter 0.35s ease;
}
.solvefx-char--west-win > img:first-child {
  filter: drop-shadow(0 0 18px rgba(80, 200, 90, 0.65)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55))
    sepia(0.15) saturate(1.2) hue-rotate(70deg) brightness(1.05);
}
.solvefx-char--west-fail > img:first-child {
  filter: drop-shadow(0 0 18px rgba(220, 60, 50, 0.55)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55))
    sepia(0.35) saturate(1.4) hue-rotate(-20deg) brightness(0.95);
}
.solvefx-west-muzzle {
  position: absolute !important;
  right: -18%;
  top: 38%;
  height: clamp(40px, 8vh, 72px) !important;
  width: auto !important;
  filter: none !important;
  animation: solvefx-muzzle 0.35s ease-out 0.12s both;
}
.solvefx-char--west-fail .solvefx-west-muzzle {
  filter: hue-rotate(-40deg) saturate(1.4) !important;
}
.solvefx-west-brand {
  position: absolute;
  left: 50%;
  bottom: -12%;
  transform: translateX(-50%);
  text-align: center;
  font-family: "Roboto Mono", monospace;
  letter-spacing: 0.18em;
  color: #f3ebe0;
  text-shadow: 0 2px 0 #1a120c;
}
.solvefx-west-brand span {
  display: block;
  font-family: "Rye", Georgia, serif;
  font-size: clamp(0.9rem, 2vw, 1.25rem);
  color: #c9b896;
}
.solvefx-west-brand small {
  font-size: 0.65rem;
  opacity: 0.85;
  letter-spacing: 0.22em;
}
@keyframes solvefx-muzzle {
  0% { opacity: 0; transform: scale(0.4); }
  35% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0.35; transform: scale(1); }
}

/* Girls in CTF 2026 — glass bullet / wrong answer */
.solvefx-overlay--gctf-glass {
  background: rgba(4, 4, 10, 0.55);
}
.solvefx-overlay--gctf-wrong {
  background: rgba(28, 0, 4, 0.92);
}
.solvefx-overlay--gctf-wrong .solvefx-label {
  color: #ff2a3a;
  letter-spacing: 0.08em;
  animation: solvefx-pop 0.4s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}
.solvefx-overlay--gctf-wrong .solvefx-sub,
.solvefx-overlay--gctf-wrong .solvefx-tag {
  color: #ff8a90;
}

/* Random operator sprite — kept clear of the centered SOLVED / WRONG text */
.solvefx-char--gctf {
  left: clamp(9%, 16%, 22%);
  top: auto;
  bottom: 6vh;
  transform: none;
  animation: solvefx-gctf-char-in 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.solvefx-char--gctf img {
  height: clamp(190px, 42vh, 400px);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.solvefx-char--gctf.solvefx-char--win img {
  filter: drop-shadow(0 0 14px rgba(255, 43, 214, 0.6))
    drop-shadow(0 0 6px rgba(0, 240, 255, 0.35))
    drop-shadow(0 14px 20px rgba(0, 0, 0, 0.7));
}
.solvefx-char--gctf.solvefx-char--fail img {
  filter: grayscale(0.4) brightness(0.82)
    drop-shadow(0 0 14px rgba(255, 26, 46, 0.55))
    drop-shadow(0 14px 20px rgba(0, 0, 0, 0.7));
}

@keyframes solvefx-gctf-char-in {
  from { opacity: 0; transform: translateY(24px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 720px) {
  .solvefx-char--gctf {
    left: 50%;
    bottom: 3vh;
    transform: translateX(-50%);
  }
  .solvefx-char--gctf img { height: clamp(140px, 26vh, 220px); }
  @keyframes solvefx-gctf-char-in {
    from { opacity: 0; transform: translate(-50%, 24px) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
  }
}
