@font-face {
  font-family: Science Gothic;
  src: url("/fonts/science-gothic-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("/fonts/montserrat-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Solitreo;
  src: url("/fonts/solitreo.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Noto Arabic;
  src: url("/fonts/noto-arabic.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: Noto Bengali;
  src: url("/fonts/noto-bengali.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: Noto Devanagari;
  src: url("/fonts/noto-devanagari.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  color: white;
  background: #090721;
  font-family: Science Gothic, Arial, sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, #09072133, #090721 90%),
    url("/assets/door-blur.webp") center 38% / cover;
  opacity: .72;
}
.scene {
  --scale: 1;
  position: absolute;
  width: 480px;
  height: 854px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--scale));
  overflow: hidden;
  isolation: isolate;
  user-select: none;
}
.scene img { display: block; }
.backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  background: linear-gradient(#0a0934bd, #0a0934bd), linear-gradient(#3d3f4c, #181923);
}
.backdrop img, .backdrop::after { position: absolute; }
.back-glow { left: 79px; top: 226px; }
.back-halo { left: -155px; top: -39px; }
.back-frame { inset: 0; mix-blend-mode: soft-light; }
.back-beam {
  left: 1px;
  top: -42px;
  rotate: -42.73deg;
  mix-blend-mode: plus-lighter;
}
.back-door-blur { left: -52px; top: -1px; width: 584.128px; height: 922px; object-fit: cover; filter: blur(2px); }
.back-door { left: -90px; top: -113px; width: 655px; height: 1034px; }
.backdrop::after {
  content: "";
  inset: 52.93% 0 0;
  background: linear-gradient(180deg, transparent, #070625f5 58.51%);
}

header { position: absolute; inset: 0 0 auto; height: 100px; direction: ltr; z-index: 5; }
.campaign-logo { position: absolute; left: 170.3px; top: 20px; width: 137.7px; height: 60px; }
.campaign-logo img, .campaign-logo span { position: absolute; }
.logo-type { left: 53.63px; top: 7.73px; }
.logo-ultra { left: 2.7px; top: 7.3px; rotate: -14.83deg; }
.logo-flare, .logo-shine { left: 50.9px; top: 10.65px; }
.logo-shine { mix-blend-mode: screen; }
.logo-ultra-text {
  left: 7px;
  top: 13px;
  color: #43ffa8;
  font: 19.08px/1 Solitreo, cursive;
  rotate: -14.83deg;
  text-shadow: 0 0 4px #43ffa879;
}
.logo-black, .logo-friday {
  color: #020119;
  font: 800 17.43px/.9 Science Gothic, sans-serif;
  -webkit-text-stroke: .9px #f8dd22;
  filter: drop-shadow(0 0 2px #f8dd2266);
}
.logo-black { left: 48.47px; top: 22px; letter-spacing: 1.743px; }
.logo-friday { left: 22.2px; top: 38.5px; }

.language-control {
  position: absolute;
  top: 30px;
  right: 23px;
  width: 61px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 8px;
  background: #02010b33;
  font: 500 13px/1.35 Montserrat, Arial, sans-serif;
}
.language-control select {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}
.language-control:focus-within { outline: 2px solid #43ffa8; outline-offset: 3px; }
.language-flag {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 50%;
  font: 27px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
html[lang="ru"] .language-flag {
  background: linear-gradient(white 33.33%, #0c47b7 33.33% 66.66%, #e53b35 66.66%);
  font-size: 0;
}

h1 {
  position: absolute;
  inset: 100px 68px auto 62px;
  display: grid;
  place-items: center;
  height: 92px;
  margin: 0;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
  font-size: 24px;
  font-style: italic;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  font-variation-settings: "CTRS" 0, "wdth" 100;
}
html[lang="ar"] :is(h1,.claim) { font-family: Noto Arabic, sans-serif; font-style: normal; }
html[lang="bn"] :is(h1,.claim) { font-family: Noto Bengali, sans-serif; font-style: normal; }
html[lang="hi"] :is(h1,.claim) { font-family: Noto Devanagari, sans-serif; font-style: normal; }

.mirror { position: absolute; left: 17px; top: 192px; width: 440px; height: 443px; }
.mirror-frame {
  position: absolute;
  left: 23.36px;
  top: 23.49px;
  width: 392.063px;
  height: 391.796px;
  overflow: hidden;
  border-radius: 50%;
}
.mirror-frame img { position: absolute; left: -19.2%; top: -10.08%; width: 139.41%; height: 139.51%; }
.bonus-under {
  position: absolute;
  left: 69.26px;
  top: 80.34px;
  width: 300.519px;
  height: 300.519px;
}
.bonus-under img { position: absolute; inset: 0; width: 100%; }
.bonus-under-glow { filter: blur(6.304px); mix-blend-mode: hard-light; }

#mirror-surface, .fog-preview {
  position: absolute;
  left: 53px;
  top: 53px;
  width: 334px;
  height: 334px;
  border-radius: 50%;
}
#mirror-surface { cursor: grab; touch-action: none; }
#mirror-surface:active { cursor: grabbing; }
#mirror-surface:focus-visible { outline: 3px solid #43ffa8; outline-offset: 3px; }
.fog-preview {
  background: url("/assets/condensation.webp") center / 108% 108%;
  backdrop-filter: blur(9px);
  pointer-events: none;
}
.hint {
  position: absolute;
  left: 292px;
  top: 98px;
  width: 151px;
  height: 154.22px;
  object-fit: cover;
  scale: -1 1;
  pointer-events: none;
  animation: wipe-hint 2.2s ease-in-out infinite;
}
@keyframes wipe-hint {
  0%, 12%, 100% { translate: 0 0; }
  47%, 65% { translate: -81px 39px; }
}
.win-glow {
  position: absolute;
  left: -132px;
  top: -142px;
  pointer-events: none;
  animation: appear .4s ease-out both;
}
.scene[data-phase="won"] .bonus-under { opacity: 0; }

.reward { position: absolute; inset: 0; pointer-events: none; }
.reward-bonus {
  position: absolute;
  left: 21px;
  top: 283.35px;
  width: 439px;
  height: 264.336px;
  overflow: hidden;
  animation: bonus-reveal .42s cubic-bezier(.16,1,.3,1) both, bonus-pulse 1.9s .42s ease-in-out infinite;
}
.reward-bonus img { position: absolute; left: 0; top: -24.48%; width: 100%; height: 166.08%; }
@keyframes bonus-reveal { from { scale: .67; opacity: .55; } to { scale: 1; opacity: 1; } }
@keyframes bonus-pulse { 50% { scale: 1.035; filter: brightness(1.1); } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

.drop {
  position: absolute;
  object-fit: contain;
  animation: drop-appear .58s var(--delay) cubic-bezier(.17,.75,.37,1.13) both,
             float 2.6s calc(.58s + var(--delay)) ease-in-out infinite;
}
.drop-1 { left: 345px; top: 238px; width: 90px; --delay: .24s; --from-x: -91px; --from-y: 94px; }
.drop-2 { left: 23px; top: 251px; width: 85px; --delay: .16s; --from-x: 117px; --from-y: 82px; }
.drop-3 { left: 44px; top: 532px; width: 108px; --delay: .21s; --from-x: 81px; --from-y: -96px; }
.drop-4 { left: 313px; top: 485px; width: 157px; --delay: .28s; --from-x: -78px; --from-y: -90px; }
@keyframes drop-appear {
  from { translate: var(--from-x) var(--from-y); scale: .25; opacity: 0; }
  to { translate: 0 0; scale: 1; opacity: 1; }
}
@keyframes float { 50% { translate: 0 -7px; rotate: 3deg; } }

.claim {
  position: absolute;
  left: 105px;
  top: 655px;
  width: 264px;
  height: 42px;
  display: grid;
  place-items: center;
  padding-inline: 16px;
  border-radius: 16px;
  background: linear-gradient(to top, #fcd900, #43ffa8);
  box-shadow: 0 0 6px #7ff375, inset -5px 5px 10px #ffffffde;
  color: #090103;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  animation: appear .24s ease-out both;
}
.claim:focus-visible { outline: 3px solid white; outline-offset: 5px; }
.claim:active { scale: .98; }
.brand { position: absolute; left: 188px; top: 778.67px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

@media (max-aspect-ratio: 480 / 854) {
  body::before {
    background: linear-gradient(180deg, #211127, #15102e 55%, #090721);
    opacity: 1;
  }
  .backdrop {
    mask-image: linear-gradient(transparent, black 45px, black calc(100% - 30px), transparent);
  }
}
