@import url("https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap");

@font-face {
  font-family: "Zootopia";
  src: url("assets/zootopia.otf") format("opentype");
}

/* =====================
   RESET
   ===================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: #1f1f1f;
  font-family: "Luckiest Guy", Arial, Helvetica, sans-serif;
}

/* =====================
   PAGE / SCENE
   ===================== */

.page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* =====================
   BACKGROUNDS
   ===================== */

.bg-start,
.door-step,
.lobby-reveal {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

.bg-start {
  z-index: 1;
}

/* =====================
   WELCOME
   ===================== */

.welcome {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 90%;
  z-index: 10;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;

  color: #ffd21f;
  font-family: "Zootopia", "Luckiest Guy", Arial, Helvetica, sans-serif;
  font-size: clamp(34px, 5vw, 90px);
  font-weight: 900;
  line-height: 1.09;
  letter-spacing: 5px;
  text-align: center;
  text-transform: uppercase;

  -webkit-text-stroke: 2px #c79500;

  text-shadow:
    0 0 8px rgba(255, 210, 31, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.55);

  opacity: 0;
  filter: blur(8px);
  pointer-events: none;

  transform: translate(-50%, -50%) translateY(18px) scale(0.96);

  animation: fadeUp 1.4s ease-out 0.5s forwards;
}

.welcome.out {
  animation: fadeDown 0.9s ease-in forwards;
}

/* =====================
   ENTER HINT
   ===================== */

.enter-hint {
  position: absolute;
  left: 50%;
  top: 85%;
  z-index: 30;

  color: #ffd21f;
  font-family: "Zootopia", "Luckiest Guy", Arial, Helvetica, sans-serif;
  font-size: clamp(14px, 1.4vw, 28px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;

  opacity: 0;
  filter: blur(6px);
  transform: translate(-50%, -50%) translateY(16px) scale(0.95);

  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 0 8px rgba(255, 210, 31, 0.55);
}

.enter-hint.visible {
  animation: popIn 1s ease-out forwards;
}

.enter-hint:hover {
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.7),
    0 0 14px rgba(255, 210, 31, 0.85);
}

/* =====================
   START CLAWHAUSER
   ===================== */

.clawhauser {
  position: absolute;
  right: 20%;
  bottom: -1%;
  z-index: 25;

  width: clamp(75px, 20vw, 390px);
  height: auto;

  cursor: pointer;
  opacity: 0;
  filter: blur(8px);

  transform: translateY(30px) scale(0.92);
}

.clawhauser.visible {
  animation: slideUp 1.1s ease-out forwards;
}

.clawhauser:hover {
  transform: scale(1.03);
}

/* =====================
   DOOR ANIMATION
   ===================== */

.door-step {
  z-index: 60;
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;

  transition:
    opacity 0.85s ease-in-out,
    transform 1.35s ease-in-out,
    filter 0.85s ease-in-out;
}

.door-step.shown {
  opacity: 1;
  filter: blur(0);
  transform: scale(1.025);
}

.scene.entering .welcome,
.scene.entering .enter-hint,
.scene.entering .clawhauser {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.scene.entering .bg-start {
  animation: bgZoom 2.2s ease-in-out forwards;
}

/* =====================
   LOBBY REVEAL
   ===================== */

.lobby-reveal {
  z-index: 90;
  opacity: 0;
  filter: blur(8px) brightness(0.85);
  pointer-events: none;
  transform: scale(1.12);
}

.lobby-reveal.shown {
  animation: revealLobby 1.4s ease-out forwards;
}

/* =====================
   CLAWHAUSER CLASSIC BUBBLE
   ===================== */

.lobby-clawhauser-bubble {
  position: absolute;
  left: 17%;
  top: 40%;
  z-index: 112;

  max-width: 220px;
  padding: 16px 18px;

  background: #ffffff;
  color: #111111;

  border: 3px solid #000000;
  border-radius: 999px;

  font-family: "Luckiest Guy", Arial, Helvetica, sans-serif;
  font-size: clamp(12px, 1vw, 16px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;

  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.95);

  box-shadow:
    0 10px 0 rgba(0, 0, 0, 0.16),
    0 14px 22px rgba(0, 0, 0, 0.2);
}

.lobby-clawhauser-bubble.shown {
  animation: showBubble 0.8s ease-out forwards;
}

.lobby-clawhauser-bubble::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -18px;

  width: 20px;
  height: 20px;

  background: #ffffff;
  border: 5px solid #000000;
  border-radius: 50%;
}

.lobby-clawhauser-bubble::before {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -42px;

  width: 12px;
  height: 12px;

  background: #ffffff;
  border: 5px solid #000000;
  border-radius: 50%;
}

/* =====================
   QR PANEL
   ===================== */

.lobby-qr-panel {
  position: absolute;
  left: 60%;
  top: 57%;
  z-index: 114;

  width: clamp(300px, 28vw, 430px);
  padding: 18px 20px 20px;

  display: flex;
  flex-direction: column;
  align-items: center;

  background: rgba(18, 28, 37, 0.88);
  border: 4px solid #f2c230;
  border-radius: 18px;

  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) translateY(22px) scale(0.95);

  box-shadow:
    0 0 40px rgba(0, 0, 0, 0.58),
    0 0 24px rgba(242, 194, 48, 0.25),
    inset 0 0 18px rgba(0, 0, 0, 0.3);
}

.lobby-qr-panel.shown {
  pointer-events: auto;
  animation: showQRPanel 0.9s ease-out forwards;
}

.qr-title {
  margin-bottom: 12px;
  color: #f2c230;

  font-family: "Luckiest Guy", Arial, Helvetica, sans-serif;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.02;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;

  text-shadow:
    2px 2px 0 rgba(0, 0, 0, 0.65),
    0 0 8px rgba(242, 194, 48, 0.35);
}

.lobby-qr {
  position: static;
  width: clamp(240px, 22vw, 330px);
  height: auto;
  display: block;

  padding: 0;

  background: transparent;
  border: none;
  border-radius: 0;

  opacity: 1;
  pointer-events: auto;

  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.42),
    0 0 16px rgba(242, 194, 48, 0.3);
}

.lobby-qr.shown {
  opacity: 1;
}

.qr-text {
  margin-top: 14px;
  color: #f2c230;

  font-family: "Luckiest Guy", Arial, Helvetica, sans-serif;
  font-size: clamp(12px, 1vw, 16px);
  line-height: 1.18;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;

  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.65);
}

/* =====================
   JUDY
   ===================== */

.lobby-judy {
  position: absolute;
  right: -1%;
  top: 28%;
  bottom: auto;
  z-index: 110;

  width: clamp(175px, 23vw, 360px);
  height: auto;

  cursor: pointer;
  opacity: 0;
  pointer-events: none;

  transform: translateY(30px) scale(0.95);
  filter: drop-shadow(0 18px 14px rgba(0, 0, 0, 0.45));
}

.lobby-judy.shown {
  pointer-events: auto;
  animation: showJudyClean 1s ease-out forwards;
}

.lobby-judy:hover {
  transform: translateY(0) scale(1.03);
  filter: drop-shadow(0 20px 16px rgba(0, 0, 0, 0.5));
}

/* =====================
   JUDY CLASSIC BUBBLE
   ===================== */

.judy-bubble {
  position: absolute;
  right: 5%;
  top: 16%;
  z-index: 115;

  max-width: 255px;
  padding: 15px 18px;

  background: #ffffff;
  color: #000000;

  border: 3px solid #111111;
  border-radius: 999px;

  font-family: "Luckiest Guy", Arial, Helvetica, sans-serif;
  font-size: clamp(11px, 1vw, 16px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;

  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.95);

  box-shadow:
    0 10px 0 rgba(0, 0, 0, 0.16),
    0 14px 22px rgba(0, 0, 0, 0.22);
}

.judy-bubble.shown {
  animation: showBubble 0.8s ease-out forwards;
}

.judy-bubble::after {
  content: "";
  position: absolute;
  right: 58px;
  bottom: -20px;

  width: 19px;
  height: 19px;

  background: #ffffff;
  border: 5px solid #000000;
  border-radius: 50%;
}

.judy-bubble::before {
  content: "";
  position: absolute;
  right: 70px;
  bottom: -39px;

  width: 11px;
  height: 11px;

  background: #ffffff;
  border: 5px solid #000000;
  border-radius: 50%;
}

/* =====================
   KEYFRAMES
   ===================== */

@keyframes fadeUp {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translate(-50%, -50%) translateY(18px) scale(0.96);
  }

  60% {
    opacity: 1;
    filter: blur(1px);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }
}

@keyframes fadeDown {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }

  to {
    opacity: 0;
    filter: blur(8px);
    transform: translate(-50%, -50%) translateY(-18px) scale(1.03);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translate(-50%, -50%) translateY(16px) scale(0.95);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }
}

@keyframes slideUp {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(30px) scale(0.92);
  }

  65% {
    opacity: 1;
    filter: blur(1px);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes bgZoom {
  from {
    filter: brightness(1);
    transform: scale(1);
  }

  to {
    filter: brightness(0.85);
    transform: scale(1.045);
  }
}

@keyframes revealLobby {
  0% {
    opacity: 0;
    filter: blur(8px) brightness(0.85);
    transform: scale(1.12);
  }

  55% {
    opacity: 1;
    filter: blur(2px) brightness(1);
  }

  100% {
    opacity: 1;
    filter: blur(0) brightness(1);
    transform: scale(1);
  }
}

@keyframes showJudyClean {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter:
      blur(6px)
      drop-shadow(0 18px 14px rgba(0, 0, 0, 0.3));
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter:
      blur(0)
      drop-shadow(0 18px 14px rgba(0, 0, 0, 0.45));
  }
}

@keyframes showBubble {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes showQRPanel {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(22px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }
}

/* =====================
   MOBILE - NO SCROLL
   ===================== */

@media (max-width: 600px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .page,
  .scene {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
  }

  .welcome {
    width: 92%;
    gap: 6px;
    font-size: clamp(22px, 8vw, 44px);
    line-height: 1.05;
    letter-spacing: -1px;
  }

  .enter-hint {
    top: 80%;
    font-size: clamp(10px, 3vw, 18px);
  }

  .clawhauser {
    right: 8%;
    width: clamp(95px, 25vw, 170px);
  }

  .lobby-clawhauser-bubble {
    left: 5%;
    top: 35%;
    max-width: 140px;
    padding: 8px 10px;
    font-size: clamp(8px, 2.2vw, 11px);
    line-height: 1.18;
    border-width: 4px;
  }

  .lobby-clawhauser-bubble::after {
    right: -13px;
    bottom: -13px;
    width: 12px;
    height: 12px;
    border-width: 4px;
  }

  .lobby-clawhauser-bubble::before {
    right: -25px;
    bottom: -28px;
    width: 8px;
    height: 8px;
    border-width: 4px;
  }

  .lobby-qr-panel {
    left: 63%;
    top: 62%;
    width: clamp(210px, 58vw, 270px);
    padding: 11px 11px 13px;
    border-width: 3px;
    border-radius: 14px;
  }

  .lobby-qr {
    width: clamp(165px, 46vw, 220px);
    padding: 7px;
    border-width: 3px;
  }

  .qr-title {
    margin-bottom: 8px;
    font-size: clamp(12px, 3.4vw, 17px);
  }

  .qr-text {
    margin-top: 9px;
    font-size: clamp(8px, 2.4vw, 12px);
    line-height: 1.15;
  }

  .lobby-judy {
    right: -9%;
    top: 41%;
    width: clamp(140px, 37vw, 220px);
  }

  .judy-bubble {
    right: 3%;
    top: 20%;
    max-width: 145px;
    padding: 8px 9px;
    font-size: clamp(8px, 2.1vw, 11px);
    line-height: 1.15;
    border-width: 4px;
  }

  .judy-bubble::after {
    right: 38px;
    bottom: -14px;
    width: 13px;
    height: 13px;
    border-width: 4px;
  }

  .judy-bubble::before {
    right: 25px;
    bottom: -28px;
    width: 8px;
    height: 8px;
    border-width: 4px;
  }
}