@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kode Mono";
  src: url("../fonts/KodeMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kode Mono";
  src: url("../fonts/KodeMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #020617;
  --text: #f8fafc;
  --muted: rgba(248, 250, 252, 0.75);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Locked artboard — scale whole stage; do not restyle per phone */
  --design-w: 430;
  --design-h: 932;
  --app-scale: 1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: start center;
  overflow: hidden;
}

.app {
  position: relative;
  width: calc(var(--design-w) * 1px);
  height: calc(var(--design-h) * 1px);
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.55);
  transform: scale(var(--app-scale));
  transform-origin: top center;
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.screen[hidden] {
  display: block !important;
}

.screen__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.screen__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.1rem 1.25rem;
}

.screen__content--bottom {
  justify-content: flex-end;
  padding-bottom: 8%;
  gap: 0;
}

.screen__content--start {
  z-index: 5;
  padding-bottom: 6.5%;
}

/* —— Start intro: flicker / bottle drop / aura / button —— */
.start-flicker {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(255, 250, 230, 0.85) 0%,
    rgba(180, 210, 255, 0.35) 40%,
    transparent 70%
  );
  mix-blend-mode: screen;
}

.start-flicker.is-on {
  animation: start-flicker 0.72s ease-out;
}

@keyframes start-flicker {
  0%,
  100% {
    opacity: 0;
  }
  8% {
    opacity: 0.75;
  }
  16% {
    opacity: 0.08;
  }
  28% {
    opacity: 0.9;
  }
  38% {
    opacity: 0.12;
  }
  52% {
    opacity: 0.55;
  }
  64% {
    opacity: 0.05;
  }
  78% {
    opacity: 0.4;
  }
}

.start-stage {
  position: absolute;
  left: 50%;
  top: calc(36% + 40px);
  width: min(70%, 288px);
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  line-height: 0;
}

/* Logo above particles — top layer over vapor */
.start-logo {
  position: absolute;
  left: 50%;
  top: calc(2.5% + 20px);
  transform: translateX(-50%) scale(0.92);
  width: min(97%, 418px);
  height: auto;
  z-index: 6;
  pointer-events: none;
  display: block;
  opacity: 0;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.65))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 18px rgba(120, 180, 255, 0.35))
    drop-shadow(0 0 28px rgba(232, 197, 71, 0.22));
  transform-origin: center center;
}

.start-logo.is-waiting {
  opacity: 0;
  transform: translateX(-50%) scale(0.92);
  animation: none;
  filter: none;
}

.start-logo.is-enter {
  animation: logo-soft-pop 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.start-logo.is-shown {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: logo-glow-breathe 3.2s ease-in-out infinite;
}

@keyframes logo-soft-pop {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.9);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.65))
      drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45))
      drop-shadow(0 0 18px rgba(120, 180, 255, 0.35))
      drop-shadow(0 0 28px rgba(232, 197, 71, 0.22));
  }
}

@keyframes logo-glow-breathe {
  0%,
  100% {
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.65))
      drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45))
      drop-shadow(0 0 14px rgba(120, 180, 255, 0.28))
      drop-shadow(0 0 22px rgba(232, 197, 71, 0.16));
  }
  50% {
    filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.7))
      drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5))
      drop-shadow(0 0 26px rgba(140, 195, 255, 0.48))
      drop-shadow(0 0 36px rgba(232, 197, 71, 0.32));
  }
}

.start-aura {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  /* Reach lower behind the bottle; still stop before pedestal/button */
  height: 74%;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
  overflow: hidden;
  /* Keep vapor strong to the top; soft fade only near the box */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 82%,
    rgba(0, 0, 0, 0.5) 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 82%,
    rgba(0, 0, 0, 0.5) 93%,
    transparent 100%
  );
}

.start-aura.is-live {
  opacity: 1;
}

.start-aura::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 62%;
  width: min(90%, 360px);
  height: 72%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 55%,
    rgba(232, 197, 71, 0.28) 0%,
    rgba(120, 170, 230, 0.12) 42%,
    transparent 72%
  );
  animation: aura-breathe 3.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes aura-breathe {
  0%,
  100% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(0.92);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

.start-aura__canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.start-bottle {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transform: translateY(-145%) scaleY(1.05);
  transform-origin: center bottom;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
  will-change: transform, opacity;
}

.start-bottle.is-dropping {
  opacity: 1;
  animation: bottle-drop 0.5s cubic-bezier(0.55, 0.02, 0.95, 0.45) forwards;
}

.start-bottle.is-landed {
  opacity: 1;
  animation: bottle-impact 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes bottle-drop {
  0% {
    opacity: 1;
    transform: translateY(-145%) scale(1, 1.06);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1, 1);
  }
}

@keyframes bottle-impact {
  0% {
    transform: translateY(0) scale(1, 1);
  }
  30% {
    transform: translateY(6px) scale(1.06, 0.88);
  }
  58% {
    transform: translateY(-3px) scale(0.97, 1.04);
  }
  100% {
    transform: translateY(0) scale(1, 1);
  }
}

#screen-start.is-impact {
  animation: incorrect-shake 0.48s var(--ease);
}

#screen-start.is-impact .screen__bg {
  animation: incorrect-dim 0.55s var(--ease);
}

#btn-start.is-waiting {
  opacity: 0 !important;
  transform: translateY(10px) scale(0.98);
  filter: none;
  pointer-events: none;
  animation: none;
}

#btn-start.is-intro-in:not(:disabled) {
  animation: start-btn-enter 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: none;
}

/* Start glow only after delay (is-ready added ~1s after enter) */
#btn-start.is-ready:not(:disabled):not(.is-intro-in):not(.is-waiting) {
  animation: pulse-ready 1.6s var(--ease) infinite;
}

#btn-start:not(.is-ready):not(.is-waiting):not(:disabled) {
  opacity: 1;
  filter: none;
  animation: none;
}

@keyframes start-btn-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.screen__content--game {
  justify-content: flex-end;
  gap: 0;
  padding-top: 0;
  padding-bottom: 8%;
  pointer-events: none;
}

.screen__content--game .game-panel,
.screen__content--game .img-btn,
.screen__content--game .option {
  pointer-events: auto;
}

.screen__content--result {
  justify-content: flex-end;
  padding-bottom: 8%;
}

.screen__content--thanks {
  justify-content: flex-end;
  gap: 0;
  padding-bottom: 8%;
}

.img-btn {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease),
    filter 0.2s var(--ease);
}

.img-btn img {
  display: block;
  width: min(58vw, 220px);
  height: auto;
  pointer-events: none;
}

.img-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.img-btn:disabled {
  cursor: default;
  opacity: 0.45;
  filter: grayscale(0.2);
}

.img-btn--action img {
  width: min(58vw, 220px);
}

.status-text {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  min-height: 1.2em;
}

.screen__bg--loading {
  background: #000;
}

.screen__content--loading {
  justify-content: center;
  align-items: center;
}

.loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: min(80%, 260px);
}

.loading-text {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-align: center;
}

/* Tiny perfume bottle loader */
.load-bottle {
  width: 44px;
  line-height: 0;
  filter: drop-shadow(0 0 12px rgba(232, 197, 71, 0.28))
    drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
}

.load-bottle__svg {
  display: block;
  width: 100%;
  height: auto;
}

.load-bottle__liquid {
  transition: y 0.3s var(--ease), height 0.3s var(--ease);
}

.load-bottle__mist {
  pointer-events: none;
  animation: bottle-mist-breathe 2.6s ease-in-out infinite;
  mix-blend-mode: screen;
}

.load-bottle__wave {
  transition: cy 0.3s var(--ease);
  animation: bottle-wave 1.5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes bottle-mist-breathe {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.55;
  }
}

@keyframes bottle-wave {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleX(1);
  }
  50% {
    opacity: 0.55;
    transform: scaleX(1.08);
  }
}

.load-bottle.is-full {
  animation: load-bottle-gleam 0.75s var(--ease);
}

@keyframes load-bottle-gleam {
  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(232, 197, 71, 0.28))
      drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
  }
  45% {
    filter: drop-shadow(0 0 20px rgba(232, 197, 71, 0.65))
      drop-shadow(0 0 28px rgba(180, 210, 255, 0.28))
      drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
  }
}

#btn-start:disabled {
  opacity: 0.35;
  filter: grayscale(0.35);
}

.img-btn.is-ready:not(:disabled) {
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(232, 197, 71, 0.35));
  animation: pulse-ready 1.6s var(--ease) infinite;
}

.img-btn.is-ready:not(:disabled):active,
.img-btn.is-tapping {
  animation: none;
  transform: scale(0.94);
  filter: drop-shadow(0 0 14px rgba(232, 197, 71, 0.55));
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease);
}

@keyframes pulse-ready {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(232, 197, 71, 0.28));
  }
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 16px rgba(232, 197, 71, 0.5));
  }
}

/* Design canvas: 1080 x 1920 — bottle centered, y:410 */
.product-stage {
  position: absolute;
  left: 50%;
  top: calc(100% * 410 / 1920);
  transform: translateX(-50%) scale(1.25);
  transform-origin: top center;
  margin-top: 5px;
  z-index: 2;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-spotlight {
  position: absolute;
  width: 160%;
  height: 120%;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(180, 210, 255, 0.22) 0%,
    rgba(100, 140, 200, 0.08) 42%,
    transparent 70%
  );
  animation: spotlight-breathe 3.2s ease-in-out infinite;
  z-index: 0;
}

/* Quiet vapor behind the bottle */
.product-mist {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 160%;
  height: 130%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.product-mist__cloud {
  position: absolute;
  inset: 8%;
  background: radial-gradient(
      ellipse 42% 48% at 38% 58%,
      rgba(220, 230, 255, 0.2) 0%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 38% 44% at 64% 40%,
      rgba(232, 197, 71, 0.12) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 50% 36% at 50% 72%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 72%
    );
  filter: blur(14px);
  mix-blend-mode: screen;
  animation: product-mist-drift 7.5s ease-in-out infinite;
}

.product-mist__cloud--2 {
  inset: -2%;
  opacity: 0.55;
  filter: blur(20px);
  animation-duration: 9.8s;
  animation-direction: reverse;
  animation-delay: -2.5s;
}

@keyframes product-mist-drift {
  0%,
  100% {
    transform: translate(-3%, 2%) scale(1);
    opacity: 0.55;
  }
  35% {
    transform: translate(4%, -3%) scale(1.06);
    opacity: 0.85;
  }
  65% {
    transform: translate(-2%, -1%) scale(0.97);
    opacity: 0.65;
  }
}

.product-image {
  position: relative;
  z-index: 1;
  max-width: min(72%, 280px);
  max-height: calc(var(--design-h) * 0.44 * 1px);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
  opacity: 0;
}

.product-image.is-enter {
  animation: bottle-enter 0.55s var(--ease) forwards;
}

/* First question only — gentle drop from above (lighter than start screen) */
.product-image.is-drop {
  animation: game-bottle-drop 0.62s cubic-bezier(0.55, 0.02, 0.95, 0.45) forwards;
}

@keyframes bottle-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes game-bottle-drop {
  0% {
    opacity: 0;
    transform: translateY(-52px) scale(0.97, 1.03);
  }
  72% {
    opacity: 1;
    transform: translateY(3px) scale(1, 0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1, 1);
  }
}

@keyframes spotlight-breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.92);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06);
  }
}

.hud {
  position: absolute;
  top: calc(3.2% - 8px);
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 6%;
  pointer-events: none;
}

.hud__stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 4.5rem;
}

.hud__stat--score {
  align-items: flex-start;
}

.hud__stat--timer {
  align-items: flex-end;
}

.hud__label {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 230, 163, 0.72);
  line-height: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.hud__num {
  font-family: "Kode Mono", monospace;
  font-size: clamp(1.05rem, 4.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65),
    0 0 14px rgba(96, 165, 250, 0.2);
  display: inline-block;
  transition: color 0.25s var(--ease), text-shadow 0.25s var(--ease);
}

#hud-score.is-tick {
  animation: score-tick 0.4s var(--ease);
}

@keyframes score-tick {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.28);
    color: #f5e6a3;
    text-shadow: 0 0 12px rgba(232, 197, 71, 0.7);
  }
  100% {
    transform: scale(1);
  }
}

.hud__stat--timer.is-warn #hud-timer {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.55);
}

.hud__stat--timer.is-danger #hud-timer {
  color: #f87171;
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.65);
  animation: timer-pulse 0.9s ease-in-out infinite;
}

@keyframes timer-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

.game-panel {
  width: min(86%, 360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  padding-top: 1rem;
  padding-bottom: 0;
}

.options {
  width: calc(100% - 10px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: calc(0.75rem + 10px);
  margin: 0;
  padding: 0.35rem 0;
  /* Keep options raised; lock button stays at bottom with Start/Next */
  transform: translateY(-60px);
}

/* Flow-style option pills: white outline / gold selected */
.option {
  position: relative;
  width: 100%;
  min-height: 3.15rem;
  border: 1.5px solid #ffffff;
  border-radius: 999px;
  padding: 0.78rem 1.35rem;
  background: transparent;
  background-image: none;
  color: #ffffff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(0.78rem, 3.4vw, 0.98rem);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
  opacity: 0;
  transform: translateY(14px) scale(0.88);
  transform-origin: center center;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s var(--ease);
}

.option.is-enter {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: option-pop-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.option:not(.is-enter) {
  pointer-events: none;
}

#screen-game.is-introducing .option {
  pointer-events: none;
  cursor: default;
}

@keyframes option-pop-in {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.88);
  }
  58% {
    opacity: 1;
    transform: translateY(-3px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Soft live breathe — only after all options + lock button have appeared */
.options.is-breathing .option.is-enter:not(.is-selected):not(:disabled):not(.is-locked) {
  animation: option-breathe 2.8s ease-in-out infinite;
}

.options.is-breathing
  .option.is-enter:not(.is-selected):not(:disabled):not(.is-locked):nth-child(1) {
  animation-delay: 0s;
}

.options.is-breathing
  .option.is-enter:not(.is-selected):not(:disabled):not(.is-locked):nth-child(2) {
  animation-delay: 0.35s;
}

.options.is-breathing
  .option.is-enter:not(.is-selected):not(:disabled):not(.is-locked):nth-child(3) {
  animation-delay: 0.7s;
}

.option.is-selected {
  background: linear-gradient(180deg, #4a5568 0%, #1c2230 100%);
  background-image: linear-gradient(180deg, #4a5568 0%, #1c2230 100%);
  border-color: #e8c547;
  box-shadow: 0 0 0 1px rgba(232, 197, 71, 0.35),
    0 0 14px rgba(232, 197, 71, 0.55);
  opacity: 1;
  transform: translateY(0);
  animation: option-glow 0.3s var(--ease), option-selected-breathe 2.4s 0.3s ease-in-out infinite;
}

.option:disabled {
  cursor: default;
}

.option.is-locked:not(.is-selected) {
  opacity: 0.55;
  transform: translateY(0);
  animation: none;
}

@keyframes option-breathe {
  0%,
  100% {
    transform: scale(1);
    border-color: rgba(255, 255, 255, 0.88);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    /* Whole pill + label scale together as one piece */
    transform: scale(1.03);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 12px rgba(180, 210, 255, 0.22);
  }
}

@keyframes option-selected-breathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 1px rgba(232, 197, 71, 0.35),
      0 0 12px rgba(232, 197, 71, 0.45);
  }
  50% {
    transform: scale(1.025);
    box-shadow: 0 0 0 1px rgba(232, 197, 71, 0.5),
      0 0 18px rgba(232, 197, 71, 0.65);
  }
}

@keyframes option-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(232, 197, 71, 0);
  }
  55% {
    box-shadow: 0 0 0 1px rgba(232, 197, 71, 0.45),
      0 0 18px rgba(232, 197, 71, 0.7);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(232, 197, 71, 0.35),
      0 0 14px rgba(232, 197, 71, 0.55);
  }
}

/* Lock → Next button swap */
#btn-game-action.img-btn--swap img {
  animation: btn-swap-in 0.32s var(--ease);
}

@keyframes btn-swap-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Correct perfume name — incorrect result only */
.result-correct-name {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  z-index: 3;
  width: min(82%, 320px);
  margin: 0;
  padding: 0 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  pointer-events: none;
  opacity: 0;
}

.result-correct-name__label {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(0.62rem, 2.8vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(248, 250, 252, 0.72);
}

.result-correct-name__text {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.2rem, 5.5vw, 1.65rem);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: #f5e6a3;
  text-shadow:
    0 0 12px rgba(232, 197, 71, 0.55),
    0 0 28px rgba(180, 210, 255, 0.25);
}

.result-correct-name[hidden] {
  display: none !important;
}

.result-correct-name.is-shown {
  display: flex;
  animation: result-name-enter 0.55s var(--ease) forwards,
    result-name-breathe 2.8s ease-in-out 0.55s infinite;
}

@keyframes result-name-enter {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(10px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }
}

@keyframes result-name-breathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    text-shadow:
      0 0 10px rgba(232, 197, 71, 0.4),
      0 0 22px rgba(180, 210, 255, 0.18);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    text-shadow:
      0 0 16px rgba(232, 197, 71, 0.7),
      0 0 32px rgba(180, 210, 255, 0.35);
  }
}

/* Bottle only when correct (.is-shown) */
.result-product {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(50%, 220px);
  z-index: 2;
  display: none;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  overflow: visible;
}

.result-product.is-shown {
  display: grid;
  animation: fade-result 0.55s var(--ease) forwards;
}

.result-product[hidden] {
  display: none !important;
  animation: none;
  opacity: 0;
}

.result-spotlight {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 140%;
  height: 130%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(232, 197, 71, 0.32) 0%,
    rgba(180, 210, 255, 0.14) 36%,
    rgba(100, 140, 200, 0.05) 58%,
    transparent 72%
  );
  z-index: 0;
  opacity: 0;
  pointer-events: none;
}

.result-product.is-shown .result-spotlight {
  animation: result-spotlight-in 0.65s 0.05s ease-out forwards,
    result-spotlight-breathe 3.2s 0.7s ease-in-out infinite;
}

/* Tiny golden stars around the bottle */
.result-stars {
  position: absolute;
  left: 50%;
  top: calc(50% + 20px);
  width: 120%;
  height: 125%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}

.result-product.is-shown .result-stars {
  animation: result-stars-in 0.6s 0.2s ease-out forwards;
}

.result-stars span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f5e6a3;
  box-shadow: 0 0 4px rgba(232, 197, 71, 0.95), 0 0 9px rgba(245, 230, 163, 0.65);
  animation: result-star-twinkle 1.6s ease-in-out infinite;
}

/* Left side */
.result-stars span:nth-child(1) { left: 10%; top: 28%; animation-delay: 0s; }
.result-stars span:nth-child(2) { left: 6%; top: 48%; width: 2px; height: 2px; animation-delay: 0.35s; }
.result-stars span:nth-child(3) { left: 14%; top: 62%; width: 2.5px; height: 2.5px; animation-delay: 0.7s; }
.result-stars span:nth-child(4) { left: 8%; top: 78%; width: 2px; height: 2px; animation-delay: 1.1s; }
.result-stars span:nth-child(5) { left: 18%; top: 38%; animation-delay: 0.2s; }
.result-stars span:nth-child(6) { left: 12%; top: 18%; width: 2px; height: 2px; animation-delay: 0.9s; }

/* Right side */
.result-stars span:nth-child(7) { left: 88%; top: 26%; animation-delay: 0.15s; }
.result-stars span:nth-child(8) { left: 92%; top: 46%; width: 2px; height: 2px; animation-delay: 0.55s; }
.result-stars span:nth-child(9) { left: 84%; top: 60%; width: 2.5px; height: 2.5px; animation-delay: 0.85s; }
.result-stars span:nth-child(10) { left: 90%; top: 74%; width: 2px; height: 2px; animation-delay: 0.4s; }
.result-stars span:nth-child(11) { left: 80%; top: 36%; animation-delay: 1.2s; }
.result-stars span:nth-child(12) { left: 86%; top: 16%; width: 2px; height: 2px; animation-delay: 0.65s; }

/* Top */
.result-stars span:nth-child(13) { left: 32%; top: 8%; width: 2px; height: 2px; animation-delay: 0.1s; }
.result-stars span:nth-child(14) { left: 48%; top: 5%; width: 2.5px; height: 2.5px; animation-delay: 0.5s; }
.result-stars span:nth-child(15) { left: 62%; top: 10%; width: 2px; height: 2px; animation-delay: 0.95s; }
.result-stars span:nth-child(16) { left: 40%; top: 14%; animation-delay: 0.3s; }
.result-stars span:nth-child(17) { left: 55%; top: 12%; width: 2px; height: 2px; animation-delay: 1.35s; }
.result-stars span:nth-child(18) { left: 70%; top: 8%; width: 2px; height: 2px; animation-delay: 0.75s; }

/* Bottom */
.result-stars span:nth-child(19) { left: 30%; top: 88%; width: 2px; height: 2px; animation-delay: 0.45s; }
.result-stars span:nth-child(20) { left: 48%; top: 92%; width: 2.5px; height: 2.5px; animation-delay: 0.05s; }
.result-stars span:nth-child(21) { left: 66%; top: 86%; width: 2px; height: 2px; animation-delay: 0.8s; }
.result-stars span:nth-child(22) { left: 38%; top: 82%; animation-delay: 1.05s; }
.result-stars span:nth-child(23) { left: 58%; top: 90%; width: 2px; height: 2px; animation-delay: 0.25s; }
.result-stars span:nth-child(24) { left: 74%; top: 84%; width: 2px; height: 2px; animation-delay: 1.4s; }

@keyframes result-stars-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes result-star-twinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

.result-mist {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 240%;
  height: 200%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}

.result-product.is-shown .result-mist {
  animation: result-mist-fade 0.8s 0.15s var(--ease) forwards;
}

.result-mist__cloud {
  position: absolute;
  inset: 10%;
  background: radial-gradient(
      ellipse 40% 50% at 40% 55%,
      rgba(232, 197, 71, 0.22) 0%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 45% 55% at 62% 42%,
      rgba(160, 200, 255, 0.18) 0%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 35% 40% at 50% 70%,
      rgba(255, 255, 255, 0.12) 0%,
      transparent 70%
    );
  filter: blur(10px);
  mix-blend-mode: screen;
  animation: result-mist-drift 3.4s ease-in-out infinite;
}

.result-mist__cloud--2 {
  inset: 0;
  opacity: 0.65;
  filter: blur(14px);
  animation-duration: 4.2s;
  animation-direction: reverse;
}

.result-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.55);
  border-radius: 50%;
  border: 1.5px solid rgba(232, 197, 71, 0.85);
  box-shadow: 0 0 12px rgba(232, 197, 71, 0.45),
    inset 0 0 10px rgba(245, 230, 163, 0.2);
  z-index: 0;
  opacity: 0;
  pointer-events: none;
}

.result-product.is-shown .result-ring {
  animation: result-ring-flash 0.65s 0.08s ease-out forwards;
}

.result-product__img {
  width: 100%;
  height: auto;
  max-height: calc(var(--design-h) * 0.28 * 1px);
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2))
    drop-shadow(0 0 18px rgba(232, 197, 71, 0.28))
    drop-shadow(0 0 26px rgba(140, 180, 230, 0.2));
  position: relative;
  z-index: 2;
}

.result-shimmer {
  position: absolute;
  inset: 8%;
  z-index: 3;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.08) 28%,
    transparent 58%
  );
  opacity: 0;
  transform: scale(0.85);
  -webkit-mask-image: radial-gradient(ellipse 55% 70% at 50% 48%, #000 40%, transparent 72%);
  mask-image: radial-gradient(ellipse 55% 70% at 50% 48%, #000 40%, transparent 72%);
}

.result-product.is-shown .result-shimmer {
  animation: shimmer-gleam 1.1s 0.2s ease-out forwards;
}

@keyframes result-spotlight-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
  }
  to {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes result-spotlight-breathe {
  0%,
  100% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(0.94);
  }
  50% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes result-mist-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.55;
  }
}

@keyframes result-mist-drift {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4%) scale(1.05);
  }
}

@keyframes result-ring-flash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.92);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.4);
  }
}

@keyframes shimmer-gleam {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  35% {
    opacity: 0.7;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

/* Result Next / Result button — delayed enter */
#btn-result-action.is-waiting {
  opacity: 0 !important;
  transform: translateY(14px) scale(0.96);
  pointer-events: none;
  animation: none;
  filter: none;
}

#btn-result-action.is-intro-in:not(:disabled) {
  animation: start-btn-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: none;
}

#btn-result-action.is-ready:not(:disabled):not(.is-intro-in):not(.is-waiting) {
  animation: pulse-ready 1.6s var(--ease) infinite;
}

/* Game lock button — staged reveal after options */
#btn-game-action.is-waiting {
  opacity: 0 !important;
  transform: translateY(14px) scale(0.96);
  pointer-events: none;
  animation: none;
  filter: none;
}

#btn-game-action.is-intro-in:disabled {
  animation: game-lock-btn-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
}

#btn-game-action.is-intro-in:not(:disabled) {
  animation: start-btn-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: none;
}

@keyframes game-lock-btn-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    filter: grayscale(0.2);
  }
  to {
    opacity: 0.45;
    transform: translateY(0) scale(1);
    filter: grayscale(0.2);
  }
}

/* Incorrect elegant pulse/shake on result screen */
#screen-result.is-incorrect .screen__bg {
  animation: incorrect-dim 0.7s var(--ease);
}

#screen-result.is-incorrect {
  animation: incorrect-shake 0.45s var(--ease);
}

@keyframes incorrect-dim {
  0% {
    filter: brightness(1);
  }
  35% {
    filter: brightness(0.82);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes incorrect-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}

.final-score {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  z-index: 3;
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(3.2rem, 14vw, 4.6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 18px rgba(96, 165, 250, 0.55);
  pointer-events: none;
  opacity: 0;
}

.final-score.is-animate,
.final-score.is-perfect {
  opacity: 1;
  /* Pop 3 times (100% ↔ 125%), then stay stable */
  animation: score-zoom-pulse 0.9s linear 2 forwards;
}

.final-score.is-perfect {
  text-shadow: 0 0 22px rgba(232, 197, 71, 0.65),
    0 0 40px rgba(96, 165, 250, 0.45);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Keep bottle centered during fade (do not override translateX) */
@keyframes fade-result {
  from {
    opacity: 0;
    transform: translate(-50%, -45%) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes score-zoom-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.25);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

