/* Steal a Dinorot · link in bio (TikTok) */
@font-face {
  font-family: "Luckiest Guy";
  src: url("fonts/luckiest-guy.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Fredoka One";
  src: url("fonts/fredoka-one.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #12061f;
  --ink: #2a0d3f;
  --ink-deep: #170524;
  --yellow: #ffd23f;
  --orange: #ff8a1e;
  --pink: #ff4fd8;
  --cyan: #3ce6ff;
  --green-top: #63f56f;
  --green-bot: #1fb43a;
  --green-edge: #0f6a24;
  --blurple-top: #7d87ff;
  --blurple-bot: #4650e6;
  --blurple-edge: #262d93;
  --glass: rgba(22, 8, 42, 0.66);
  --glass-line: rgba(255, 255, 255, 0.16);
  --display: "Luckiest Guy", "Arial Black", Impact, sans-serif;
  --body: "Fredoka One", "Arial Rounded MT Bold", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: #fff;
  font-family: var(--body);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------------------------------------------------------------- the background */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg__img {
  position: absolute; inset: 0;
  background: url("img/bg.jpg") center top / cover no-repeat;
  transform: scale(1.04);
  animation: drift 18s ease-in-out infinite alternate;
}
.bg__rays {
  position: absolute; left: 50%; top: 46%;
  width: 170vmax; height: 170vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 120, 230, 0.10) 0deg 7deg, transparent 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 52%);
          mask: radial-gradient(circle, #000 0 18%, transparent 52%);
  animation: spin 60s linear infinite;
}
.bg__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 6, 31, 0.55) 0%, rgba(18, 6, 31, 0.05) 26%, rgba(18, 6, 31, 0.15) 56%, rgba(18, 6, 31, 0.92) 86%, var(--bg) 100%),
    radial-gradient(120% 70% at 50% 40%, transparent 40%, rgba(10, 2, 20, 0.6) 100%);
}
.pixels { position: absolute; inset: 0; }
.pixels span {
  position: absolute; bottom: -24px;
  background: var(--c, #fff);
  box-shadow: 0 0 10px var(--c, #fff);
  opacity: 0.85;
  animation: rise 10s linear infinite;
}

/* ---------------------------------------------------------------- page 2: the game and the Discord */
.page {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100svh;
  max-width: 460px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
}
.hero { text-align: center; margin-top: 4px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 4px;
  font-family: var(--display); font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(180deg, #fff3a8, var(--yellow));
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 4px 0 var(--ink-deep);
  transform: rotate(-3deg);
}
.logo {
  margin: 10px 0 0;
  display: flex; flex-direction: column; align-items: center;
  line-height: 0.86;
  font-weight: normal;
  transform: rotate(-4deg);
  isolation: isolate;
}
/* the title: a dark outline layer under a bright fill layer (both move together) */
.logo__line { position: relative; display: block; font-family: var(--display); letter-spacing: 0.02em; text-transform: uppercase; }
.logo__stroke {
  position: absolute; left: 0; right: 0; top: 0; z-index: 0;
  color: var(--ink); -webkit-text-fill-color: var(--ink);
  -webkit-text-stroke: 0.18em var(--ink);
  text-shadow: 0 0.07em 0 var(--ink), 0 0.13em 0 var(--ink-deep), 0 0.22em 0.35em rgba(0, 0, 0, 0.5);
}
.logo__fill { position: relative; z-index: 1; display: block; }
.logo__small { font-size: clamp(30px, 9.5vw, 46px); }
.logo__small .logo__fill { color: #fff; }
.logo__big {
  font-size: clamp(62px, 19.5vw, 108px);
  margin-top: 4px;
  filter: drop-shadow(0 0 16px rgba(255, 196, 60, 0.55));
  animation: pop 2.6s ease-in-out infinite;
}
.logo__big .logo__fill {
  color: #ffe14d;
  background: linear-gradient(180deg, #ffffff 0%, #fff27a 30%, #ffd13a 62%, #ff9a26 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.by { margin: 12px 0 0; font-size: 14px; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.85); text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); }
.by b { color: var(--yellow); font-weight: normal; }

/* Koda, big, behind the buttons */
.stage {
  position: relative; width: 100%;
  flex: 1 1 auto;
  min-height: clamp(250px, 44svh, 470px);
  display: flex; justify-content: center; align-items: flex-end;
  pointer-events: none;
}
.stage__burst {
  position: absolute; left: 50%; top: 42%;
  width: 150%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 230, 120, 0.16) 0deg 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 0 22%, transparent 62%);
          mask: radial-gradient(circle, #000 0 22%, transparent 62%);
  animation: spin 24s linear infinite;
}
.stage__glow {
  position: absolute; left: 50%; top: 45%;
  width: 92%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 79, 216, 0.55) 0%, rgba(140, 60, 255, 0.28) 38%, transparent 68%);
  animation: breathe 3.2s ease-in-out infinite;
}
.stage__koda {
  position: relative;
  height: clamp(300px, 54svh, 580px); width: auto;
  margin-bottom: -96px;
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.7)) drop-shadow(0 14px 26px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 30px rgba(255, 79, 216, 0.45));
  animation: float 3.2s ease-in-out infinite;
  transform-origin: 50% 90%;
}

.links { position: relative; z-index: 2; width: 100%; display: grid; gap: 12px; }

/* chunky game buttons (studded like the bricks of the map) */
.btn {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 13px 16px;
  font-family: var(--display); font-size: 25px; letter-spacing: 0.04em; text-transform: uppercase; text-align: left;
  color: #fff; text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  border: 3px solid var(--ink);
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--ink-deep), 0 10px 22px rgba(0, 0, 0, 0.45), inset 0 3px 0 rgba(255, 255, 255, 0.35), inset 0 -6px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink-deep), 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 3px 0 rgba(255, 255, 255, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.2); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -40%; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: shine 3.4s ease-in-out infinite;
}
.btn__icon {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-radius: 12px;
}
.btn__icon img { filter: brightness(0) invert(1); }
.btn__text { display: flex; flex-direction: column; line-height: 1; padding-top: 3px; }
.btn__text small { margin-top: 5px; font-family: var(--body); font-size: 13px; letter-spacing: 0.01em; text-transform: none; text-shadow: none; opacity: 0.92; }
.studs, .btn--play, .btn--discord {
  background-size: 16px 16px, auto;
}
.btn--play {
  padding: 16px 18px;
  font-size: 31px;
  background-image:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.26) 0 3px, rgba(0, 0, 0, 0.13) 3.6px 4.6px, transparent 5.2px),
    linear-gradient(180deg, var(--green-top), var(--green-bot));
  box-shadow: 0 6px 0 var(--green-edge), 0 6px 0 3px var(--ink), 0 12px 26px rgba(57, 211, 83, 0.35), inset 0 3px 0 rgba(255, 255, 255, 0.4), inset 0 -6px 0 rgba(0, 0, 0, 0.18);
  animation: nudge 2.4s ease-in-out infinite;
}
.btn--play:active { box-shadow: 0 2px 0 var(--green-edge), 0 2px 0 3px var(--ink), 0 6px 14px rgba(57, 211, 83, 0.3), inset 0 3px 0 rgba(255, 255, 255, 0.4), inset 0 -4px 0 rgba(0, 0, 0, 0.18); }
.btn--play .btn__icon { width: 54px; height: 54px; }
.btn--discord {
  background-image:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.2) 0 3px, rgba(0, 0, 0, 0.13) 3.6px 4.6px, transparent 5.2px),
    linear-gradient(180deg, var(--blurple-top), var(--blurple-bot));
  box-shadow: 0 6px 0 var(--blurple-edge), 0 6px 0 3px var(--ink), 0 10px 22px rgba(70, 80, 230, 0.35), inset 0 3px 0 rgba(255, 255, 255, 0.35), inset 0 -6px 0 rgba(0, 0, 0, 0.2);
}
.btn--discord::after { animation-delay: 1.2s; }
.btn--small { width: auto; padding: 10px 14px; font-size: 17px; border-radius: 12px; gap: 8px; }
.btn--yellow { color: var(--ink); text-shadow: none; background: linear-gradient(180deg, #fff2a0, var(--yellow) 55%, #ffb21e); }
.btn--ghost { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.55); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); }
.btn--ghost::after, .btn--small::after { display: none; }

/* what's new (to fill in later) */
.news {
  margin-top: 2px;
  padding: 14px 16px 12px;
  background: var(--glass);
  border: 2px solid var(--glass-line);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.news__title { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-family: var(--display); font-weight: normal; font-size: 21px; letter-spacing: 0.04em; text-transform: uppercase; }
.news__tag {
  padding: 4px 8px 2px; font-size: 13px; color: var(--ink);
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 7px;
  box-shadow: 0 3px 0 var(--ink-deep);
  animation: blink 1.6s steps(2, jump-none) infinite;
}
.news__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 15px; color: rgba(255, 255, 255, 0.92); }
.news__list li { display: flex; align-items: center; gap: 10px; }
.news__dot { flex: 0 0 auto; width: 9px; height: 9px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.news__list li:nth-child(2) .news__dot { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.foot { margin-top: 14px; font-size: 11px; letter-spacing: 0.03em; color: rgba(255, 255, 255, 0.5); text-align: center; }

/* ---------------------------------------------------------------- page 1: inside TikTok */
.tt { display: none; }
body.is-tiktok .page { display: none; }
body.is-tiktok .tt {
  position: fixed; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 104px 16px max(16px, env(safe-area-inset-bottom));
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 3, 20, 0.7), rgba(10, 3, 20, 0.35) 45%, rgba(10, 3, 20, 0.8));
}
.tt__corner { position: fixed; top: 0; right: 0; width: 132px; height: 132px; z-index: 3; pointer-events: none; }
.tt__ring {
  position: absolute; top: -34px; right: -34px;
  width: 92px; height: 92px; border-radius: 50%;
  border: 4px solid var(--yellow);
  box-shadow: 0 0 22px rgba(255, 210, 63, 0.8);
  animation: ping 1.4s ease-out infinite;
}
.tt__arrow { position: absolute; top: 14px; right: 18px; width: 96px; height: 96px; animation: point 1s ease-in-out infinite; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.tt__card {
  position: relative; z-index: 2;
  width: 100%; max-width: 420px;
  padding: 18px 16px 14px;
  text-align: center;
  background: var(--glass);
  border: 2px solid var(--glass-line);
  border-radius: 20px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.tt__kicker { margin: 0; font-family: var(--display); font-size: 17px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--yellow); }
.tt__title {
  margin: 6px 0 14px;
  font-family: var(--display); font-weight: normal; font-size: clamp(27px, 8vw, 36px); line-height: 1.02; text-transform: uppercase; letter-spacing: 0.02em;
  text-shadow: 0 3px 0 var(--ink), 0 0 2px var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -1px 0 var(--ink), -2px -1px 0 var(--ink);
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.steps li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  font-size: 18px; line-height: 1.35;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}
.steps__num {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 36px; height: 36px; padding-top: 3px;
  font-family: var(--display); font-size: 21px; color: var(--ink);
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 9px;
  box-shadow: 0 3px 0 var(--ink-deep);
}
.chip {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
  margin: 0 2px; padding: 3px 9px;
  font-size: 15px; color: #16121c;
  background: #fff; border-radius: 8px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
.chip--dots { font-size: 13px; letter-spacing: 2px; padding: 4px 8px 5px; }
.tt__why { margin: 12px 0 12px; font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.tt__actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tt__copied { min-height: 18px; margin: 10px 0 0; font-size: 13px; color: #9dff8a; }
.tt__skip { display: inline-block; margin-top: 4px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.tt__koda {
  position: absolute; z-index: 1; left: 50%; bottom: -8svh;
  height: 44svh; width: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 26px rgba(255, 79, 216, 0.5));
  animation: floatX 3.2s ease-in-out infinite;
}

/* ---------------------------------------------------------------- small or short screens */
@media (max-height: 700px) {
  .stage { min-height: 220px; }
  .stage__koda { height: clamp(250px, 46svh, 420px); margin-bottom: -80px; }
  .btn--play { font-size: 27px; padding: 13px 16px; }
  body.is-tiktok .tt { padding-top: 92px; }
  .tt__koda { height: 34svh; }
}

/* ---------------------------------------------------------------- motion */
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes drift { from { transform: scale(1.04) translateY(0); } to { transform: scale(1.1) translateY(-14px); } }
@keyframes rise { from { transform: translateY(0) rotate(0deg); opacity: 0; } 10% { opacity: 0.9; } to { transform: translateY(-112vh) rotate(200deg); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes floatX { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -10px); } }
@keyframes breathe { 0%, 100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } }
@keyframes pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes shine { 0%, 55% { left: -40%; } 85%, 100% { left: 130%; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes blink { 50% { filter: brightness(1.35); } }
@keyframes ping { 0% { transform: scale(0.75); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes point { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(8px, -8px); } }

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