@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --warm: #dcff53;
  --red: #ff3d32;
  --paper: #f2efe6;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; background: #08090b; color: #f7f4ec; }
body { font-family: Manrope, sans-serif; overflow-x: hidden; }
button { font: inherit; }

.choice-screen {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 28% 20%, rgba(212, 255, 76, .08), transparent 28%),
    radial-gradient(circle at 72% 72%, rgba(255, 52, 43, .08), transparent 34%),
    #0a0b0e;
  transition: background-color .8s ease;
}

.choice-screen::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

.choice-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
}

.choice {
  position: relative;
  appearance: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: clamp(24px, 4vw, 62px);
  border: 0;
  color: #f7f4ec;
  background: transparent;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.choice:first-child { border-right: 1px solid rgba(255,255,255,.12); }
.choice::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity .65s ease, transform 1.3s cubic-bezier(.18,.8,.2,1);
}
.choice.casper::before { background: linear-gradient(155deg, rgba(216,255,74,.2), rgba(15,25,19,.2) 48%, rgba(203,255,97,.1)); }
.choice.horror::before { background: linear-gradient(205deg, rgba(255,45,36,.24), rgba(24,4,5,.22) 50%, rgba(90,0,0,.24)); }
.choice:hover::before, .choice:focus-visible::before { opacity: 1; transform: scale(1); }
.choice:focus-visible { outline: 2px solid white; outline-offset: -8px; }

.choice-index {
  position: absolute;
  top: clamp(22px, 4vw, 55px);
  left: clamp(24px, 4vw, 62px);
  color: rgba(255,255,255,.42);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
}

.choice-copy { display: flex; flex-direction: column; align-items: flex-start; transform: translateY(16px); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.choice:hover .choice-copy, .choice:focus-visible .choice-copy { transform: translateY(0); }
.choice-copy strong {
  font-size: clamp(42px, 6vw, 96px);
  font-weight: 600;
  line-height: .88;
  letter-spacing: -.07em;
  text-wrap: balance;
}
.horror .choice-copy strong { font-size: clamp(33px, 4.45vw, 72px); }
.choice-copy small {
  margin-top: 20px;
  color: rgba(255,255,255,.56);
  font-size: clamp(12px, 1.1vw, 16px);
  font-weight: 500;
  letter-spacing: .02em;
  opacity: .45;
  transform: translateY(8px);
  transition: opacity .5s ease .06s, transform .5s ease .06s;
}
.choice:hover .choice-copy small, .choice:focus-visible .choice-copy small { opacity: 1; transform: translateY(0); }
.casper:hover .choice-copy small { color: var(--warm); }
.horror:hover .choice-copy small { color: #ff7971; }
.choice-arrow {
  position: absolute;
  right: clamp(24px, 4vw, 62px);
  bottom: clamp(24px, 4vw, 62px);
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  font-size: 22px;
  opacity: 0;
  transform: translate(-15px, 15px) rotate(-25deg);
  transition: opacity .4s ease, transform .6s cubic-bezier(.2,.8,.2,1), background .3s, color .3s;
}
.choice:hover .choice-arrow, .choice:focus-visible .choice-arrow { opacity: 1; transform: translate(0, 0) rotate(0); }
.casper:hover .choice-arrow { background: var(--warm); color: #10120b; border-color: var(--warm); }
.horror:hover .choice-arrow { background: var(--red); border-color: var(--red); }

.ambient { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .8s ease; }
.choice-screen[data-mood="casper"] .ambient-casper { opacity: 1; }
.choice-screen[data-mood="horror"] .ambient-horror { opacity: 1; }
.choice-screen[data-mood="casper"] { background-color: #101714; }
.choice-screen[data-mood="horror"] { background-color: #17090a; }

.moon {
  position: absolute;
  left: 16%;
  top: 12%;
  width: min(33vw, 470px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 3%, #ecffc0 18%, #a6ca3e 52%, #485a21 74%, transparent 75%);
  box-shadow: 0 0 120px rgba(205,255,77,.22);
  animation: float 7s ease-in-out infinite;
}
.moon::after { content: ""; position: absolute; inset: 18% 15% 22% 28%; border: 1px solid rgba(255,255,255,.42); border-radius: 46% 54% 58% 42%; transform: rotate(-22deg); }
.cloud { position: absolute; width: 38vw; height: 90px; border-radius: 50%; background: rgba(207,255,205,.06); filter: blur(26px); animation: drift 12s ease-in-out infinite alternate; }
.cloud-one { left: -7%; bottom: 22%; }
.cloud-two { left: 28%; top: 13%; animation-delay: -5s; }
.spark { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: white; box-shadow: 0 0 16px 4px var(--warm); animation: blink 2.6s ease-in-out infinite; }
.spark-one { left: 9%; top: 24%; }
.spark-two { left: 43%; top: 58%; animation-delay: -1.2s; }

.red-moon {
  position: absolute;
  right: 8%;
  top: 6%;
  width: min(41vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 60% 44%, #ffaaa5 0 2%, #b61d18 18%, #4b0907 56%, transparent 68%);
  box-shadow: 0 0 140px rgba(255,40,30,.22);
  animation: pulse 5s ease-in-out infinite;
}
.scratch { position: absolute; right: 25%; top: -20%; width: 13px; height: 145%; background: linear-gradient(to right, #380806, #ff3b31 48%, #5d0b08); box-shadow: 0 0 30px rgba(255,45,35,.35); transform: rotate(19deg) translateY(-18%); animation: slash-in .9s cubic-bezier(.2,.8,.2,1) forwards; }
.scratch-two { right: 34%; animation-delay: .08s; }
.scratch-three { right: 43%; animation-delay: .16s; }

.watch-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2.6vw, 38px);
  background: #000;
  animation: reveal .8s ease both;
}
.watch-screen[hidden] { display: none; }
.player-frame { width: min(100%, 1500px); aspect-ratio: 16/9; background: #000; box-shadow: 0 30px 100px rgba(0,0,0,.7); }
.player-frame iframe { display: block; width: 100%; height: 100%; background: #000; }
.connection { position: fixed; width: 5px; height: 5px; right: 12px; bottom: 12px; border-radius: 50%; background: #cfff54; box-shadow: 0 0 9px #cfff54; opacity: .42; }
.connection.offline { background: #555; box-shadow: none; }

@keyframes float { 50% { transform: translateY(-18px) rotate(3deg); } }
@keyframes drift { to { transform: translateX(80px) scale(1.2); } }
@keyframes blink { 50% { opacity: .2; transform: scale(.6); } }
@keyframes pulse { 50% { transform: scale(1.04); filter: brightness(1.18); } }
@keyframes slash-in { to { transform: rotate(19deg) translateY(0); } }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 760px) {
  .choice-grid { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .choice:first-child { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .choice { min-height: 50svh; padding: 24px; }
  .choice-index { top: 20px; left: 24px; }
  .choice-copy { transform: none; }
  .choice-copy strong { font-size: clamp(40px, 13vw, 62px); }
  .horror .choice-copy strong { font-size: clamp(29px, 9.5vw, 47px); }
  .choice-copy small { margin-top: 12px; opacity: .8; transform: none; }
  .choice-arrow { right: 22px; bottom: 22px; width: 43px; height: 43px; opacity: .65; transform: none; }
  .moon { width: 70vw; left: 4%; top: 4%; }
  .red-moon { width: 78vw; right: -15%; top: 45%; }
  .watch-screen { padding: 0; }
  .player-frame { width: 100%; }
}

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