@font-face {
  font-family: "16x8pxl Mono";
  src: url("assets/fonts/16x8pxl-mono.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: #0f4d8f;
  color: #ffffff;
  font-family: "16x8pxl Mono", "Courier New", Courier, monospace;
  text-align: center;
  image-rendering: pixelated;
}

a {
  color: #ffffff;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #ffd4ef;
}

button,
audio {
  font: inherit;
}

.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.pixel-star {
  position: absolute;
  width: var(--size);
  height: var(--size);
  color: #ffffff;
  transform: translate3d(0, 0, 0);
  animation: starDrift var(--speed) linear infinite;
}

.pixel-star::before,
.pixel-star::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.pixel-star::before {
  left: 40%;
  top: 0;
  width: 20%;
  height: 100%;
}

.pixel-star::after {
  left: 0;
  top: 40%;
  width: 100%;
  height: 20%;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1030px);
  margin: 0 auto;
  padding: 0 16px 44px;
}

.mini-banner {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff9bd;
  font: 700 13px/1.2 "16x8pxl Mono", "Courier New", Courier, monospace;
  letter-spacing: 0;
  text-align: left;
}

.nyan-stage {
  padding-top: clamp(58px, 8vh, 88px);
}

.stage-header h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(24px, 5vw, 44px);
  line-height: 1.25;
  letter-spacing: 0;
  text-shadow:
    3px 0 #000000,
    -3px 0 #000000,
    0 3px #000000,
    0 -3px #000000,
    4px 4px #000000;
}

.pixel-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 0;
  font-size: clamp(13px, 2vw, 16px);
  line-height: 1.5;
}

.contract-address {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.contract-address span {
  display: block;
}

.disclaimer {
  width: min(100%, 980px);
  margin: 0 auto 24px;
  padding: 10px 14px;
  border: 3px solid #000000;
  background: rgba(0, 0, 0, 0.42);
  color: #ffffff;
  font: 700 13px/1.55 "16x8pxl Mono", "Courier New", Courier, monospace;
  text-align: center;
  overflow-wrap: anywhere;
}

.disclaimer a {
  color: #fff9bd;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.disclaimer span {
  display: block;
}

.cat-window {
  width: min(100%, 980px);
  min-height: clamp(250px, 42vw, 400px);
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  border: 5px solid #000000;
  border-radius: 12px;
  background: #0f4d8f;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.52),
    0 12px 24px rgba(0, 0, 0, 0.24);
}

.cat-window::before,
.cat-window::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: clamp(58px, 11vw, 120px);
  z-index: 1;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 4px, transparent 4px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 4px, transparent 4px);
  background-size: 180px 100%, 240px 100%;
  background-position: 28px 42%, 126px 70%;
  opacity: 0.18;
  animation: headerStars 5s steps(6) infinite;
}

.cat-window::before {
  top: 0;
}

.cat-window::after {
  bottom: 0;
  transform: scaleX(-1);
}

.cat-spacer {
  height: clamp(58px, 11vw, 118px);
}

.cat-lane {
  --doge-size: 300px;
  --doge-overlap: -92px;
  --rainbow-tuck: 126px;
  --rainbow-lift: -34px;
  --right-gap: 170px;
  position: relative;
  height: clamp(126px, 21vw, 200px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--doge-size) var(--right-gap);
  align-items: center;
}

.rainbow-mask {
  position: relative;
  z-index: 1;
  width: calc(100% + var(--rainbow-tuck));
  margin-right: calc(var(--rainbow-tuck) * -1);
  height: clamp(82px, 12vw, 118px);
  overflow: hidden;
  align-self: center;
  transform: translateY(var(--rainbow-lift));
}

.rainbow-track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: rainbowSlide 2.5s linear infinite;
}

.rainbow-block {
  flex: 0 0 clamp(72px, 11vw, 118px);
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  margin-top: 8px;
}

.rainbow-block.frame-b {
  margin-top: 0;
}

.rainbow-block span {
  display: block;
  min-height: 10px;
}

.rainbow-block span:nth-child(1) {
  background: #fefdc2;
}

.rainbow-block span:nth-child(2) {
  background: #ffff00;
}

.rainbow-block span:nth-child(3) {
  background: #f9e830;
}

.rainbow-block span:nth-child(4) {
  background: #f7cb10;
}

.rainbow-block span:nth-child(5) {
  background: #faa50c;
}

.rainbow-block span:nth-child(6) {
  background: #d27500;
}

.nyan-doge {
  position: relative;
  z-index: 2;
  width: var(--doge-size);
  height: auto;
  margin-left: var(--doge-overlap);
  transform: translateY(-16%);
  animation: dogeBob 1.7s steps(2, end) infinite;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 16px;
}

.control-row audio {
  width: min(100%, 260px);
  height: 42px;
}

.audio-note {
  width: 180px;
  margin: 0;
  padding: 8px 10px;
  border: 3px solid #000000;
  background: rgba(0, 0, 0, 0.42);
  color: #fff9bd;
  font-size: 12px;
  line-height: 1.35;
}

.timer {
  margin: 10px auto 0;
  color: #ffffff;
  text-shadow: 2px 2px #000000;
}

.timer p {
  margin: 8px 0;
  font-size: clamp(15px, 2.4vw, 20px);
}

.timer strong {
  display: block;
  min-height: 1.1em;
  font-size: clamp(44px, 8vw, 78px);
  line-height: 1;
}

.pixel-button-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 30px;
  color: #ffd85c;
}

.pixel-button {
  min-height: 48px;
  padding: 10px 20px;
  border: 4px solid #000000;
  border-radius: 0;
  background: #ffe75c;
  color: #1b1700;
  cursor: default;
  box-shadow: 5px 5px 0 #000000;
  font-weight: 700;
  letter-spacing: 0;
}

.info-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, 980px);
  margin: 0 auto;
}

.info-panel {
  min-height: 210px;
  padding: 18px;
  border: 4px solid #000000;
  background: rgba(0, 0, 0, 0.48);
  text-align: left;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.7);
}

.info-panel h2 {
  margin: 0 0 12px;
  color: #fff9bd;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
  text-shadow: 2px 2px #000000;
}

.info-panel p {
  margin: 0;
  font: 700 14px/1.55 "16x8pxl Mono", "Courier New", Courier, monospace;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.social-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.social-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 3px solid #000000;
  border-radius: 0;
  background: #ffe75c;
  color: #1b1700;
  box-shadow: 4px 4px 0 #000000;
  font: 700 12px/1.2 "16x8pxl Mono", "Courier New", Courier, monospace;
  cursor: default;
}

.social-button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.launch-pending {
  margin-top: 16px;
  padding: 10px;
  border: 3px solid #000000;
  background: #ffe75c;
  color: #1b1700;
  font: 700 13px/1.35 "16x8pxl Mono", "Courier New", Courier, monospace;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.launch-pending span {
  display: block;
}

@keyframes starDrift {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-130vw);
  }
}

@keyframes headerStars {
  0%,
  100% {
    opacity: 0.1;
  }

  50% {
    opacity: 0.26;
  }
}

@keyframes rainbowSlide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes dogeBob {
  0%,
  100% {
    transform: translateY(-16%);
  }

  50% {
    transform: translateY(-9%);
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .mini-banner {
    right: auto;
    width: max-content;
    max-width: calc(100vw - 18px);
    padding: 8px 10px;
    font-size: 11px;
    text-align: left;
  }

  .nyan-stage {
    padding-top: 72px;
  }

  .disclaimer {
    margin-bottom: 20px;
    padding: 9px 10px;
    font-size: 12px;
  }

  .cat-window {
    border-width: 4px;
    border-radius: 8px;
  }

  .cat-lane {
    --doge-size: 210px;
    --doge-overlap: -56px;
    --rainbow-tuck: 86px;
    --rainbow-lift: -25px;
    --right-gap: 0px;
  }

  .rainbow-block {
    flex-basis: 76px;
  }

  .control-row {
    margin-top: 16px;
  }

  .audio-note {
    width: min(100%, 260px);
  }

  .info-panels {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .info-panel {
    min-height: 0;
    text-align: center;
  }

  .info-panel p {
    max-width: 34ch;
    margin: 0 auto;
    font-size: 13px;
  }

  .social-actions {
    margin-top: 16px;
  }

  .social-button {
    min-width: 128px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
