.game-flash-countdown-claim {
  --flash-stage-art: none;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.portal-page.is-game-focus .mini-game-card:has(.game-flash-countdown-claim) {
  --game-card-play-min-height: 452px;
  --game-card-play-max-height: 780px;
  --game-stage-play-min-height: 300px;
}

.game-flash-countdown-claim .game-hud {
  gap: 6px;
  padding: 8px;
  border-bottom: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(180deg, #f0444d 0%, #c41723 58%, #8f111a 100%);
  box-shadow: inset 0 -4px 0 rgba(77, 5, 10, 0.22);
}

.game-flash-countdown-claim .game-hud-item {
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(64, 8, 12, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 3px 0 rgba(73, 6, 11, 0.18);
}

.game-flash-countdown-claim .game-hud-label {
  color: #fff3a0;
  font-size: 9px;
  line-height: 1;
}

.game-flash-countdown-claim .game-hud-value {
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.22);
}

.game-flash-countdown-claim .game-stage {
  min-height: 300px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 212, 90, 0.28), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(118, 18, 38, 0.2)),
    var(--flash-stage-art) center / cover no-repeat,
    linear-gradient(160deg, #ef404b, #ffd45a);
  box-shadow:
    inset 0 12px 18px rgba(255, 255, 255, 0.18),
    inset 0 -24px 34px rgba(96, 10, 22, 0.24);
}

.game-flash-countdown-claim .game-stage::before,
.game-flash-countdown-claim .game-stage::after {
  display: block;
  pointer-events: none;
}

.game-flash-countdown-claim .game-stage::before {
  z-index: 1;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(90deg, transparent 0 calc(50% - 1px), rgba(255, 255, 255, 0.22) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(180deg, transparent 0 calc(50% - 1px), rgba(255, 255, 255, 0.18) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
  filter: none;
}

.game-flash-countdown-claim .game-stage::after {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.26), transparent 15%),
    radial-gradient(circle at 50% 50%, transparent 0 35%, rgba(255, 212, 90, 0.16) 36% 37%, transparent 38%),
    linear-gradient(180deg, transparent 0%, rgba(118, 18, 38, 0.12) 100%);
}

.portal-page.is-game-focus .game-flash-countdown-claim:not(.is-countdown):not(.is-playing):not(.is-completing):not(.is-finished) .game-stage {
  min-height: clamp(364px, 50svh, 420px);
}

@supports (height: 100dvh) {
  .portal-page.is-game-focus .game-flash-countdown-claim:not(.is-countdown):not(.is-playing):not(.is-completing):not(.is-finished) .game-stage {
    min-height: clamp(364px, 50dvh, 420px);
  }
}

.portal-page.is-game-focus .game-flash-countdown-claim.is-countdown .game-stage,
.portal-page.is-game-focus .game-flash-countdown-claim.is-playing .game-stage,
.portal-page.is-game-focus .game-flash-countdown-claim.is-completing .game-stage {
  min-height: var(--game-stage-play-min-height);
  height: clamp(318px, calc(100svh - 236px), 560px);
}

@supports (height: 100dvh) {
  .portal-page.is-game-focus .game-flash-countdown-claim.is-countdown .game-stage,
  .portal-page.is-game-focus .game-flash-countdown-claim.is-playing .game-stage,
  .portal-page.is-game-focus .game-flash-countdown-claim.is-completing .game-stage {
    height: clamp(318px, calc(100dvh - 236px), 560px);
  }
}

@supports selector(:has(*)) {
  .portal-page.is-game-focus .game-flash-countdown-claim.is-countdown .game-stage,
  .portal-page.is-game-focus .game-flash-countdown-claim.is-playing .game-stage,
  .portal-page.is-game-focus .game-flash-countdown-claim.is-completing .game-stage {
    height: auto;
  }
}

.game-flash-countdown-claim.is-playing .game-stage {
  touch-action: manipulation;
}

.game-flash-countdown-claim.is-finished .game-stage {
  min-height: 0;
  height: auto;
  background: #ffffff;
}

.game-flash-countdown-claim.is-finished .game-overlay {
  position: static;
  display: block;
  padding: 12px 16px;
  background: #ffffff;
  backdrop-filter: none;
}

.game-flash-countdown-claim.is-finished .game-overlay-panel {
  width: 100%;
  padding: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.flash-ring {
  position: absolute;
  z-index: 1;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  pointer-events: none;
}

.flash-ring--one {
  inset: 18% 16%;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.16);
}

.flash-ring--two {
  inset: 32% 26%;
  border-color: rgba(255, 212, 90, 0.4);
}

.flash-target {
  --target-life: 0;
  --target-sweep: 100%;
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  isolation: isolate;
  background:
    radial-gradient(circle at 34% 30%, #ffffff 0 8px, #ffe477 9px 18px, #ff3648 19px 100%);
  box-shadow:
    0 14px 26px rgba(75, 0, 20, 0.34),
    0 0 0 8px rgba(255, 255, 255, 0.3),
    0 0 28px rgba(255, 212, 90, 0.34);
  cursor: pointer;
}

.flash-target::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -13px;
  border-radius: inherit;
  background:
    conic-gradient(from -90deg, rgba(255, 212, 90, 0.9) var(--target-sweep), rgba(255, 255, 255, 0.18) 0),
    rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 18px rgba(255, 212, 90, 0.32);
}

.flash-target span {
  width: 48%;
  height: 48%;
  border: 5px solid #ffffff;
  border-radius: inherit;
  box-shadow: inset 0 0 0 7px #1d75de;
}

.flash-target::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.82);
  opacity: 0.8;
  animation: flash-target-breathe 760ms ease-in-out infinite;
}

.flash-target.is-cleared {
  pointer-events: none;
  animation: flash-target-clear 360ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.flash-target.is-cleared span {
  animation: flash-target-core-clear 360ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.flash-target.is-cleared::after {
  animation: none;
  opacity: 0;
}

.flash-pop {
  position: absolute;
  z-index: 5;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  color: #ffffff;
  isolation: isolate;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.flash-pop strong {
  position: relative;
  z-index: 4;
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
  text-shadow: 0 3px 0 rgba(99, 0, 0, 0.34), 0 0 16px rgba(255, 212, 90, 0.6);
  animation: flash-pop-score 720ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.flash-pop-flare,
.flash-pop-ring,
.flash-pop-ray,
.flash-pop-shard {
  position: absolute;
  pointer-events: none;
}

.flash-pop-flare {
  z-index: 1;
  inset: 34px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 18%, rgba(255, 212, 90, 0.74) 19% 44%, rgba(255, 54, 72, 0.18) 45% 72%, transparent 73%);
  animation: flash-pop-flare 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.flash-pop-ring {
  z-index: 2;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  animation: flash-pop-ring 720ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.flash-pop-ring--tight {
  inset: 29px;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.36);
}

.flash-pop-ring--wide {
  inset: 16px;
  border-color: rgba(255, 212, 90, 0.72);
  animation-delay: 45ms;
}

.flash-pop-ray {
  left: 50%;
  top: 50%;
  z-index: 0;
  width: 8px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 212, 90, 0.18));
  transform-origin: 50% 100%;
  animation: flash-pop-ray 660ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.flash-pop-shard {
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(135deg, #ffffff, #ffd45a 58%, #ff3648);
  animation: flash-pop-shard 680ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes flash-target-breathe {
  0%,
  100% {
    transform: scale(0.94);
  }

  50% {
    transform: scale(1.04);
  }
}

@keyframes flash-target-clear {
  0% {
    opacity: 1;
    filter: brightness(1) saturate(1);
    transform: translate3d(var(--target-x), var(--target-y), 0) scale(1);
  }

  32% {
    opacity: 1;
    filter: brightness(1.55) saturate(1.22);
    transform: translate3d(var(--target-x), var(--target-y), 0) scale(1.32);
  }

  100% {
    opacity: 0;
    filter: brightness(1.8) saturate(1.28) blur(2px);
    transform: translate3d(var(--target-x), var(--target-y), 0) scale(0.18) rotate(12deg);
  }
}

@keyframes flash-target-core-clear {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  40% {
    opacity: 1;
    transform: scale(1.26) rotate(-8deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.2) rotate(18deg);
  }
}

@keyframes flash-pop-flare {
  0% {
    opacity: 0.95;
    transform: scale(0.36);
  }

  52% {
    opacity: 0.9;
    transform: scale(1.35);
  }

  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

@keyframes flash-pop-ring {
  0% {
    opacity: 0.9;
    transform: scale(0.34);
  }

  72% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

@keyframes flash-pop-ray {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -100%) rotate(var(--ray-angle)) scaleY(0.18);
  }

  58% {
    opacity: 0.94;
    transform: translate(-50%, -112%) rotate(var(--ray-angle)) scaleY(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -138%) rotate(var(--ray-angle)) scaleY(0.64);
  }
}

@keyframes flash-pop-shard {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--shard-angle)) translateY(-8px) scale(0.5);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--shard-angle)) translateY(calc(-1 * var(--shard-distance))) scale(0.12);
  }
}

@keyframes flash-pop-score {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.68);
  }

  28% {
    opacity: 1;
    transform: translateY(-4px) scale(1.18);
  }

  100% {
    opacity: 0;
    transform: translateY(-28px) scale(0.92);
  }
}

.game-flash-countdown-claim .game-overlay {
  background: rgba(255, 242, 225, 0.72);
  backdrop-filter: none;
}

.game-flash-countdown-claim .game-overlay-panel {
  width: min(284px, 100%);
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 30px rgba(100, 12, 18, 0.2), 0 0 0 6px rgba(255, 255, 255, 0.24);
  text-align: center;
}

.flash-ready-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(180deg, #ff4b55, #d6101e);
  font-size: 12px;
  font-weight: 900;
}

.flash-ready-art {
  width: 82px;
  height: 82px;
  margin: 10px auto;
  border-radius: 999px;
  background:
    radial-gradient(circle, #ff3648 0 18px, #ffffff 19px 24px, #1d75de 25px 33px, #ffd45a 34px 100%);
  box-shadow: 0 10px 20px rgba(175, 34, 22, 0.2);
}

@media (max-width: 340px), (max-height: 620px) {
  .portal-page.is-game-focus .game-flash-countdown-claim:not(.is-countdown):not(.is-playing):not(.is-completing):not(.is-finished) .game-stage {
    min-height: 352px !important;
  }
}
