/*** Pulse Theme ***/
:root {
  --pulse-green: #8bc34a;
  --pulse-lime: #c6ff65;
  --pulse-dark-green: #243b13;
  --pulse-black: #080b06;
  --pulse-white: #f8fff0;
}

/** common styles **/
.header-ds-logo {
  position: absolute;
  top: 1dvh;
  left: 1dvh;
  width: 30px;
  z-index: 7;
}

.header-candyday {
  width: 80px;
  position: absolute;
  right: 1dvh;
  top: 1dvh;
  z-index: 7;
}

/*** Landing Page Screen ***/
#landingPageScreen {
  display: block;
  visibility: visible;
  opacity: 1;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background-image: url("https://cdn.makear.ai/pulsecandyday/assets/images/bgOne.png");
  background-size: cover;
  background-position: center;
  transition:
    visibility 400ms ease-in-out,
    opacity 400ms ease-in-out;
}

#landingPageScreen .floating-pack-one {
  position: absolute;
  top: 8dvh;
  right: 5dvw;
  width: 50px;
}

#landingPageScreen .floating-pack-two {
  position: absolute;
  width: 50px;
  left: 5vw;
  top: 16dvh;
}

#landingPageScreen .floating-pack-three {
  position: absolute;
  bottom: 5dvh;
  right: 4dvw;
  width: 50px;
}

.candyday-logo {
  position: absolute;
  top: 12dvh;
  left: 0;
  right: 0;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55%;
}

.landing-title {
  position: absolute;
  top: 28dvh;
  width: 70vw;
  right: 0;
  left: 0;
  margin: auto;
}

.landing-copy {
  color: #fff;
  font-size: 1rem;
  text-align: center;
  position: absolute;
  inset: 0;
  top: 22dvh;
  margin: auto;
  width: 80%;
  height: fit-content;
  font-family: "Ubuntu", sans-serif;
}

.landing-start-btn {
  position: absolute;
  bottom: 20dvh;
  left: 0;
  right: 0;
  margin: auto;
  width: 65vw;
  background: transparent;
  border: none;
}

.landing-start-btn img {
  width: 100%;
  pointer-events: none;
}

.landing-start-btn:active {
  transform: scale(0.96);
  box-shadow:
    0 4px 12px rgba(139, 195, 74, 0.2),
    inset 0 2px 5px rgba(0, 0, 0, 0.15);
}

/** How To Play Screen **/
#howToPlayScreen {
  display: none;
  visibility: hidden;
  opacity: 0;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background-image: url("https://cdn.makear.ai/pulsecandyday/assets/images/bgTwo.png");
  background-size: cover;
  background-position: center;
  transition:
    visibility 400ms ease-in-out,
    opacity 400ms ease-in-out;
}

#howToPlayScreen .floating-pack-one {
  position: absolute;
  top: 8dvh;
  right: 5dvw;
  width: 50px;
}

#howToPlayScreen .floating-pack-two {
  position: absolute;
  width: 50px;
  left: 5vw;
  top: 16dvh;
}

#howToPlayScreen .floating-pack-three {
  position: absolute;
  bottom: 5dvh;
  right: 4dvw;
  width: 50px;
}

#howToPlayScreen .logo-grab-the-pulse {
  width: 20dvw;
  position: absolute;
  top: 5dvh;
  right: 0;
  left: 0;
  margin: auto;
  pointer-events: none;
}

#howToPlayScreen h1 {
  position: absolute;
  top: 16dvh;
  right: 0;
  left: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  font-family: "Zen Dots", sans-serif;
  font-weight: 900;
  text-align: center;
  /* Gradient text */
  background: linear-gradient(
    180deg,
    #ffffff 12.98%,
    #e9fad3 31.25%,
    #ceff90 31.26%,
    #ceff90 48.07%,
    #a6eb51 48.08%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.5rem;
}

.how-to-play-panel {
  position: absolute;
  top: 24dvh;
  right: 0;
  left: 0;
  margin: auto;
  width: 80vw;
  aspect-ratio: 1214 / 1335;
  box-sizing: border-box;
  background-image: url("https://cdn.makear.ai/pulsecandyday/assets/images/containerHowToPlay.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.2dvh;
  padding: 6% 11%;
}

.instruction-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.instruction-point {
  flex-shrink: 0;
  width: 20%;
  height: auto;
  object-fit: contain;
}

.instruction-copy {
  flex: 1;
  min-width: 0;
  color: #fff;
}

.instruction-copy h2 {
  margin: 0 0 5px;
  font-family: "Exo 2", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  font-style: italic;
  line-height: 1.05;
  text-transform: uppercase;
}

/* Instruction headings — Points 1 and 3 */
.instruction-item:nth-child(1) .instruction-copy h2,
.instruction-item:nth-child(3) .instruction-copy h2 {
  background: linear-gradient(91.15deg, #ffffff 0.49%, #0fac13 86.08%);

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Instruction heading — Point 2 */
.instruction-item:nth-child(2) .instruction-copy h2 {
  background: linear-gradient(90.88deg, #ffffff -10.54%, #ff2c00 135.63%);

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.instruction-copy p {
  margin: 0;
  font-family: "Ubuntu", sans-serif;
  font-size: 12px;
  line-height: 1.15;
}

.bold {
  font-weight: 800;
}

#startMissionBtn {
  background: none;
  border: none;
  position: absolute;
  bottom: 8dvh;
  right: 0;
  left: 0;
  margin: auto;
  width: 65vw;
  cursor: pointer;
}

#startMissionBtn img {
  width: 100%;
  pointer-events: none;
}

/*** Pulse Loading Screen ***/
#loadingScreen {
  display: none;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  color: var(--pulse-white);
  background-image: url("https://cdn.makear.ai/pulsecandyday/assets/images/bgLoading.png");
  background-size: cover;
  background-position: center;
  transition:
    opacity 300ms ease,
    visibility 300ms ease;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 85%;
  max-width: 360px;
  text-align: center;
}

.loading-pack {
  display: block;
  width: min(48vw, 180px);
  height: auto;
  object-fit: contain;
  margin-bottom: 34px;
  filter: drop-shadow(0 10px 28px rgba(139, 195, 74, 0.25));
  animation: pulsePackFloat 2s ease-in-out infinite;
}

.loading-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(198, 255, 101, 0.18);
  border-top-color: var(--pulse-lime);
  border-right-color: var(--pulse-green);
  border-radius: 50%;
  animation: pulseSpin 0.8s linear infinite;
}

.loading-title {
  margin: 24px 0 0;
  background: linear-gradient(
    180deg,
    #ffffff 12.98%,
    #e9fad3 31.25%,
    #ceff90 31.26%,
    #ceff90 48.07%,
    #a6eb51 48.08%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(198, 255, 101, 0.2);
  font-family: "Zen Dots", sans-serif;
}

.loading-copy {
  min-height: 24px;
  margin: 12px 0 0;
  color: rgba(248, 255, 240, 0.8);
  font-size: 0.95rem;
  line-height: 1.5;
  font-family: "Ubuntu", sans-serif;
}

.loading-dots {
  display: flex;
  gap: 7px;
  margin-top: 20px;
}

.loading-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pulse-lime);
  animation: pulseDot 1s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pulseSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulsePackFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes pulseDot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.75);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-pack,
  .loading-spinner,
  .loading-dots span {
    animation-duration: 2s;
  }
}

/*** Game Screen ***/
#gameScreen {
  display: none;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--pulse-black);
  transition:
    visibility 400ms ease-in-out,
    opacity 400ms ease-in-out;
}

#webcam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  z-index: 1;
}

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
}

/*** Damage Vignette ***/
.damage-vignette {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0;

  background: radial-gradient(
    ellipse at center,
    rgba(255, 0, 0, 0.08) 0%,
    rgba(255, 0, 0, 0.18) 35%,
    rgba(255, 0, 0, 0.55) 70%,
    rgba(255, 0, 0, 0.85) 100%
  );
}

.damage-vignette.is-active {
  animation: vignetteFlash 1.1s ease-out;
}

@keyframes vignetteFlash {
  0% {
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* Game background (moved off the canvas so environment art can sit above it) */
.game-bg {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url("https://cdn.makear.ai/pulsecandyday/assets/images/game/bgSpace.png")
    center / cover no-repeat;
}

/* Environment: nebula, top right */
.env-nebula {
  position: absolute;
  top: 0;
  right: 0;
  width: 50vw;
  height: auto;
  z-index: 6;
  pointer-events: none;
}

/* Environment: galaxy, top left */
.env-galaxy {
  position: absolute;
  top: 0;
  left: 0;
  width: 50vw;
  height: auto;
  z-index: 6;
  pointer-events: none;
}

/* Environment: planet one, middle right (below the nebula) */
.env-planet-one {
  position: absolute;
  top: 17%;
  right: -57%;
  width: 60vw;
  height: auto;
  z-index: 6;
  pointer-events: none;
  animation: spaceC 65s linear infinite alternate;
  will-change: transform;
}

/* Environment: planet two, middle left */
.env-planet-two {
  position: absolute;
  top: 62%;
  left: -75%;
  width: 75vw;
  height: auto;
  z-index: 6;
  pointer-events: none;
  animation: spaceCOpposite 53s linear infinite alternate;
  will-change: transform;
}

/* Environment: planet three, middle top */
.env-planet-three {
  position: absolute;
  top: -10%;
  left: 10%;
  right: 0;
  margin: auto;
  width: 40vw;
  height: auto;
  z-index: 6;
  pointer-events: none;
  --dx: 20vw;
  --dy: 8vh;
  animation: spaceDrift 40s linear infinite;
  will-change: transform;
}

.moon-one {
  position: absolute;
  top: 15%;
  right: 4%;
  margin: auto;
  width: 28vw;
  height: auto;
  z-index: 6;
  pointer-events: none;
}

.moon-two {
  position: absolute;
  top: -2%;
  right: 0;
  left: 35%;
  margin: auto;
  width: 18vw;
  height: auto;
  z-index: 6;
  pointer-events: none;
  --dx: 34vw;
  --dy: 10vh;
  animation: spaceDrift 40s linear infinite;
  will-change: transform;
}

/* Environment: asteroid fly-by (positioned and animated from JS) */
.env-asteroid {
  position: absolute;
  top: 0;
  left: 0;
  height: auto;
  opacity: 0;
  z-index: 6;
  pointer-events: none;
  will-change: transform;
}

/* Environment: star (placed at random spots from JS) */
.env-star {
  position: absolute;
  transform: translate(-50%, -50%);
  /* left/top = the star's centre */
  height: auto;
  opacity: 1;
  z-index: 6;
  pointer-events: none;
}

.env-star-center {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  margin: auto;
  transform: unset;
  z-index: 6456456;
  scale: 1.4;
  pointer-events: none;
}

/* Slow curved drift at the top, then back to the starting spot, on repeat.
   --dx = how far left it travels, --dy = how far down the arc dips */
@keyframes spaceDrift {
  0% {
    transform: translate(0, 0);
  }

  10% {
    transform: translate(calc(var(--dx) * -0.0955), calc(var(--dy) * 0.5878));
  }

  20% {
    transform: translate(calc(var(--dx) * -0.3455), calc(var(--dy) * 0.9511));
  }

  30% {
    transform: translate(calc(var(--dx) * -0.6545), calc(var(--dy) * 0.9511));
  }

  40% {
    transform: translate(calc(var(--dx) * -0.9045), calc(var(--dy) * 0.5878));
  }

  50% {
    transform: translate(calc(var(--dx) * -1), 0);
  }

  60% {
    transform: translate(calc(var(--dx) * -0.9045), calc(var(--dy) * 0.2057));
  }

  70% {
    transform: translate(calc(var(--dx) * -0.6545), calc(var(--dy) * 0.3329));
  }

  80% {
    transform: translate(calc(var(--dx) * -0.3455), calc(var(--dy) * 0.3329));
  }

  90% {
    transform: translate(calc(var(--dx) * -0.0955), calc(var(--dy) * 0.2057));
  }

  100% {
    transform: translate(0, 0);
  }
}

/* Slow half-circle drift for the planets — each traces a gentle "C" arc and
   eases back, like a planet drifting along a curved orbit.
   planet-one: placed right-of-centre, starts at vertical centre and dips down
   along a left-bowing C. planet-two: placed bottom-left, starts low and rises
   along a right-bowing C. */
@keyframes spaceC {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-17vw, 6vh);
  }

  50% {
    transform: translate(-24vw, 24vh);
  }

  75% {
    transform: translate(-17vw, 42vh);
  }

  100% {
    transform: translate(0, 48vh);
  }
}

@keyframes spaceCOpposite {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(17vw, -6vh);
  }

  50% {
    transform: translate(24vw, -24vh);
  }

  75% {
    transform: translate(17vw, -42vh);
  }

  100% {
    transform: translate(0, -48vh);
  }
}

/*** HUD ***/
#hud {
  position: absolute;
  top: 2dvh;
  left: 2dvh;
  right: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: start;
  z-index: 10;
  color: #f8fff0;
}

.hud-text-container {
  position: relative;
  width: 33dvw;
}

.hud-text-container img {
  width: 100%;
}

.hud-text-container p {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  bottom: 10%;
  left: 20%;
  font-family: "Zen Dots", sans-serif;
  font-size: 14px;
}

/*** Instructions Popup ***/
.instructions-popup {
  position: absolute;
  inset: 0;
  z-index: 15;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  background: rgba(0, 0, 0, 0.75);

  visibility: hidden;
  opacity: 0;
  pointer-events: none;

  transition:
    opacity 300ms ease,
    visibility 300ms ease;
}

.instructions-popup.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.instructions-popup-content {
  width: min(85vw, 420px);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.instructions-popup-content > img {
  display: block;
  width: 100%;
  height: auto;
}

#affirmativeBtn {
  width: 75%;
  padding: 14px 20px;

  border: none;
  border-radius: 8px;

  background: transparent;
  color: #080b06;

  font-family: "Zen Dots", sans-serif;
  font-size: 1rem;
  font-weight: 900;

  cursor: pointer;
}

#affirmativeBtn:active {
  transform: scale(0.96);
}

#affirmativeBtn img {
  width: 100%;
  pointer-events: none;
}

/*** Positioning Overlay ***/
.position-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  visibility: hidden;
  /* No z-index, no opacity, no isolation: the overlay must NOT form a
     stacking context, so its children rank against the environment assets */
}

/* Heading */
.position-title {
  position: absolute;
  top: 8dvh;
  left: 0;
  right: 0;
  margin: auto;
  width: 55dvw;
  z-index: 7;
}

/* Tracking copy (placeholder position, adjust from Figma) */
.tracking-copy {
  position: absolute;
  bottom: 12dvh;
  left: 0;
  right: 0;
  margin: auto;
  width: 80vw;
  z-index: 8;
}

/* Body frame: bottom centre. This element's rect is what the pose check uses. */
.position-frame {
  position: absolute;
  bottom: -13dvh;
  left: 0;
  right: 0;
  margin: auto;
  width: 95vw;
  line-height: 0;
  z-index: 7;
  scale: 1.25;
}

.body-frame-img {
  display: block;
  width: 100%;
  height: auto;
  transition: filter 200ms ease;
}

.position-frame.is-fitted .body-frame-img {
  filter: drop-shadow(0 0 12px rgba(198, 255, 101, 0.8));
}

.position-countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pulse-lime);
  font-size: clamp(6rem, 34vw, 10rem);
  font-weight: 1000;
  line-height: 1;
  text-shadow:
    0 4px 0 #486e20,
    0 0 32px rgba(198, 255, 101, 0.45);
}

.position-overlay.is-active {
  visibility: visible;
}

.position-overlay > * {
  opacity: 0;
  transition: opacity 300ms ease;
}

.position-overlay.is-active > * {
  opacity: 1;
}

/* Hide the score/timer until the game really starts */
#gameScreen.is-positioning #hud {
  visibility: hidden;
}

.position-status {
  position: absolute;
  left: 50%;
  bottom: max(2.5dvh, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: 84%;
  margin: 0;
  padding: 5px 20px;
  border: 1px solid rgba(198, 255, 101, 0.3);
  border-radius: 999px;
  background: rgba(8, 11, 6, 0.72);
  color: var(--pulse-white);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-align: center;
}

.position-countdown {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #4dff4d;
  background: linear-gradient(
    180deg,
    #ffffff 12.98%,
    #e9fad3 31.25%,
    #ceff90 31.26%,
    #ceff90 48.07%,
    #a6eb51 48.08%
  );

  box-shadow: 0 0 18px rgba(77, 255, 77, 0.35);

  font-family: "Zen Dots", sans-serif;
  font-size: 3rem;
  line-height: 1;
  color: #ffffff;
  -webkit-text-stroke: 1px #e4f787;
  text-shadow: 0 4px 18.1px #beee19;
}

/* No circle when there's no number */
.position-countdown:empty {
  display: none;
}

.position-countdown.pop {
  animation: countdownPop 0.9s ease-out;
}

@keyframes countdownPop {
  0% {
    transform: scale(1.6);
    opacity: 0;
  }

  25% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.85;
  }
}

/*** Time Up Popup ***/

.time-up-popup {
  position: absolute;
  inset: 0;
  z-index: 20;

  display: flex;
  align-items: center;
  justify-content: center;

  visibility: hidden;
  opacity: 0;
  pointer-events: none;

  transition:
    opacity 300ms ease,
    visibility 300ms ease;
}

.time-up-popup.is-active {
  visibility: visible;
  opacity: 1;
}

.time-up-content {
  width: min(82vw, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;

  pointer-events: none;
}

.time-up-container {
  position: relative;
  width: 100%;
  line-height: 0;
  margin-bottom: 20px;
}

.time-up-container > img {
  display: block;
  width: 100%;
  height: auto;
}

#timeUpScoreText {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  bottom: 10%;
  width: 90%;
  color: #ffffff;
  font-family: "Zen Dots", sans-serif;
  font-size: clamp(1.8rem, 9vw, 3rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(198, 255, 101, 0.25);
}

#getYourCardBtn,
#replayGameBtn {
  display: block;
  width: 75%;
  padding: 0;

  border: none;
  background: transparent;

  pointer-events: auto;
  cursor: pointer;

  transition: transform 150ms ease;
}

#getYourCardBtn img,
#replayGameBtn img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

#getYourCardBtn:active,
#replayGameBtn:active {
  transform: scale(0.96);
}

/** Form Screen **/
#formScreen {
  display: none;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100dvh;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: url("https://cdn.makear.ai/pulsecandyday/assets/images/bgThree.png")
    center / cover no-repeat;
  transition:
    visibility 400ms ease-in-out,
    opacity 400ms ease-in-out;
}

#formScreen [hidden] {
  display: none !important;
}

#formScreen h1 {
  position: absolute;
  top: 9dvh;
  right: 0;
  left: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  font-family: "Zen Dots", sans-serif;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(
    180deg,
    #ffffff 12.98%,
    #e9fad3 31.25%,
    #ceff90 31.26%,
    #ceff90 48.07%,
    #a6eb51 48.08%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.3rem;
}

#formScreen .note {
  position: absolute;
  top: 18dvh;
  right: 0;
  left: 0;
  margin: auto;
  width: 75vw;
  color: white;
  text-align: center;
  font-family: "Exo 2", sans-serif;
  font-size: 12px;
  font-weight: 400;
}

/* Form Container */

#formScreen .form-container {
  position: absolute;
  top: 25dvh;
  left: 0;
  right: 0;
  margin: auto;
  width: 82vw;
  box-sizing: border-box;
  padding: 8% 11% 7%;
  background: url("https://cdn.makear.ai/pulsecandyday/assets/images/containerForm.png")
    center / 100% 100% no-repeat;
  display: flex;
  flex-direction: column;
  gap: 2.2dvh;
}

#formScreen .form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

#formScreen .form-field > label {
  color: #fff;
  font-family: "Exo 2", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

#formScreen .form-field > label span {
  color: #ff302b;
}

#formScreen .form-field input[type="text"],
#formScreen .form-field input[type="tel"] {
  width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  padding: 0 9px;

  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;

  background: #fff;
  color: #222;
  font-family: "Exo 2", sans-serif;
  font-size: 1rem;
}

#formScreen .form-field input::placeholder {
  color: #bdbdbd;
  font-size: 12px;
}

/* Photo Upload */

#formScreen .photo-upload-box {
  position: relative;
  width: 100%;
  height: 100px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;

  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #999;
  cursor: pointer;
  overflow: hidden;
}

/* Captured Photo Preview */
.photo-preview-box {
  position: relative;
  width: 100%;
  height: 100px;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
}

.photo-preview-box[hidden] {
  display: none !important;
}

.photo-preview-box > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-photo-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #e32636;
  color: white;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.recapture-photo-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 8px;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-family: "Exo 2", sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

#formScreen .photo-upload-icon {
  width: 65px;
  pointer-events: none;
}

#formScreen .photo-upload-text {
  font-family: "Exo 2", sans-serif;
  font-size: 11px;
}

/* Terms Checkbox */

#formScreen .terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  color: #fff;
  font-family: "Exo 2", sans-serif;
  font-size: 10px;
  line-height: 1.3;
  padding: 0 10px;
}

#formScreen .terms-checkbox input {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin: 1px 0 0;
  accent-color: #0fac13;
}

#revealMyScoreBtn {
  position: absolute;
  bottom: 8dvh;
  right: 0;
  left: 0;
  margin: auto;
  width: 65vw;
  border: none;
  background: transparent;
}

#revealMyScoreBtn img {
  width: 100%;
  pointer-events: none;
}

#revealMyScoreBtn:active {
  transform: scale(0.96);
}

/*** Image Capture Screen ***/
#imageCaptureScreen {
  display: none;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #080b06;
  transition:
    visibility 300ms ease,
    opacity 300ms ease;
}

#imageCaptureScreen.is-active {
  display: block;
  visibility: visible;
  opacity: 1;
}

.capture-background {
  position: absolute;
  inset: 0;
  background: url("https://cdn.makear.ai/pulsecandyday/assets/images/imageCaptureBg.png")
    center / cover no-repeat;
  z-index: 1;
}

#captureVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  z-index: 1;
}

.ios-device #captureVideo {
  transform: scaleX(-1) scale(0.8);
}

.capture-frame {
  position: absolute;
  top: 6dvh;
  left: 7%;
  width: 85%;
  height: 75dvh;
  box-sizing: border-box;
  border: 2px dashed #fff;
  z-index: 2;
  pointer-events: none;
}

.capture-countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  color: #c6ff65;
  font-family: "Zen Dots", sans-serif;
  font-size: clamp(5rem, 24vw, 8rem);
  font-weight: 900;

  text-shadow:
    0 0 15px rgba(198, 255, 101, 0.8),
    0 0 35px rgba(198, 255, 101, 0.4);
}

.capture-countdown:empty {
  display: none;
}

.capture-countdown.pop {
  animation: captureCountdownPop 0.9s ease-out;
}

@keyframes captureCountdownPop {
  0% {
    transform: scale(1.6);
    opacity: 0;
  }

  25% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.85;
  }
}

.pose-text {
  position: absolute;
  bottom: 10dvh;
  right: 0;
  left: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  background: linear-gradient(
    180deg,
    #ffffff 12.98%,
    #e9fad3 31.25%,
    #ceff90 31.26%,
    #ceff90 48.07%,
    #a6eb51 48.08%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Zen Dots", sans-serif;
  font-family: "Zen Dots", sans-serif;
  z-index: 1;
  font-size: 1.5rem;
  text-transform: uppercase;
}

.pose-text-2 {
  position: absolute;
  right: 0;
  left: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  background: linear-gradient(
    180deg,
    #ffffff 12.98%,
    #e9fad3 31.25%,
    #ceff90 31.26%,
    #ceff90 48.07%,
    #a6eb51 48.08%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 1;
  font-family: "Ubuntu", sans-serif;
  bottom: 6dvh;
  font-size: 1.2rem;
  text-transform: unset;
}

/*** Score Screen ***/
#scoreScreen,
#scoreScreenTwo {
  display: none;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100dvh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: url("https://cdn.makear.ai/pulsecandyday/assets/images/bgThree.png")
    center / cover no-repeat;
  transition:
    visibility 400ms ease-in-out,
    opacity 400ms ease-in-out;
}

.score-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 88%;
  text-align: center;
}

.score-icon {
  margin-bottom: 18px;
  font-size: 4rem;
  filter: drop-shadow(0 0 16px rgba(198, 255, 101, 0.25));
}

#scoreScreen h1,
#scoreScreenTwo h1 {
  margin: 0;
  color: rgba(248, 255, 240, 0.88);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 3px;
}

.card-container {
  width: 70dvw;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 26dvh;
  margin: auto;
  height: fit-content;
  overflow: hidden;
  border-radius: 14px;
}

#cardContainerTwo {
  width: 80dvw;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 26dvh;
  margin: auto;
  height: fit-content;
  overflow: hidden;
  border-radius: 14px;
}

.card-logo {
  position: absolute;
  top: 2%;
  left: 2%;
  width: 100px;
  z-index: 3;
}

.card-frame {
  width: 100%;
  position: relative;
  z-index: 2;
  display: flex;
}

#scoreUserPhoto {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

#scoreUserPhotoTwo {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 39%;
  height: 32%;
  object-fit: cover;
  object-position: center;
  bottom: 21%;
}

#finalScoreText {
  position: absolute;
  bottom: 7.5%;
  right: 0;
  left: 0;
  margin: auto;
  width: fit-content;
  background: linear-gradient(
    180deg,
    #ffffff 12.98%,
    #e9fad3 31.25%,
    #ceff90 31.26%,
    #ceff90 48.07%,
    #a6eb51 48.08%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Zen Dots", sans-serif;
  z-index: 3;
}

#finalScoreTextTwo {
  position: absolute;
  bottom: 12%;
  right: 0;
  left: 15%;
  margin: auto;
  width: fit-content;
  font-size: 1.5rem;
  background: linear-gradient(
    180deg,
    #ffffff 12.98%,
    #e9fad3 31.25%,
    #ceff90 31.26%,
    #ceff90 48.07%,
    #a6eb51 48.08%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Zen Dots", sans-serif;
  z-index: 3;
}

.share-copy {
  position: absolute;
  bottom: 24dvh;
  right: 0;
  left: 0;
  margin: auto;
  width: fit-content;
  font-size: 14px;
  text-align: center;
  text-shadow: 2px 2px 4px #000;
  color: white;
  font-family: "Ubuntu", sans-serif;
}

.green-text {
  color: #a5eb51;
}

.share-btn {
  width: 42dvw;
  position: absolute;
  bottom: 13dvh;
  margin: auto;
  background: transparent;
  border: none;
  left: 5dvw;
}

.share-btn img {
  width: 100%;
  pointer-events: none;
}

.download-btn {
  width: 42dvw;
  position: absolute;
  margin: auto;
  background: transparent;
  border: none;
  bottom: 13dvh;
  right: 5dvw;
}

.download-btn img {
  width: 100%;
  pointer-events: none;
}

.share-btn:disabled,
.download-btn:disabled {
  opacity: 0.6;
  pointer-events: none;
}

#replayGameBtn2,
#replayGameBtnThree {
  width: 42dvw;
  position: absolute;
  bottom: 7vh;
  right: 0;
  left: 0;
  margin: auto;
  background: transparent;
  border: none;
  bottom: 5dvh;
  z-index: 33333;
}

#replayGameBtn2 img,
#replayGameBtnThree img {
  width: 100%;
  pointer-events: none;
}

#scoreBadgeTwo {
  position: absolute;
  bottom: 22%;
  z-index: 5;
  display: flex;
  align-items: end;
  gap: 20px;
  left: 20%;
}

#scoreBadgeImageTwo {
  width: 16%;
  pointer-events: none;
}

#scoreBadgeTextTwo {
  color: #ffc430;
  font-size: 1.2rem;
  padding-bottom: 6px;
  font-family: "Zen Dots", sans-serif;
}
