/* ============ BUMSLUT 64 ============ */
:root {
  --px: 'Press Start 2P', monospace;
  --vt: 'VT323', monospace;
  --gold: #ffe14a;
  --hot: #ff2a8a;
  --sky: #2ad8ff;
  --ink: #0a0418;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #000;
  color: #fff;
  overflow-x: hidden;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.blink {
  animation: blink 1s steps(2, start) infinite;
}
.blink-slow {
  animation: blink 1.6s steps(2, start) infinite;
}
@keyframes blink {
  to {
    visibility: hidden;
  }
}

/* ---------------- stage ---------------- */
.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 420px;
  max-height: 1100px;
  background: #000;
  overflow: hidden;
  font-family: var(--px);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
.stage.playing {
  touch-action: none;
}
.stage:fullscreen {
  max-height: none;
}

.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.crt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  mix-blend-mode: multiply;
}

.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  text-shadow: 2px 2px 0 #000;
}
.hud button,
.hud a {
  pointer-events: auto;
}

.stage-chrome {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 5;
}
.chrome-btn {
  width: 38px;
  height: 38px;
  border: 2px solid #fff;
  background: rgba(0, 0, 0, 0.55);
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.scroll-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.75;
  animation: blink 1.4s steps(2, start) infinite;
  z-index: 4;
}
.stage.playing .scroll-hint {
  display: none;
}

.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  padding: 16px;
}

/* ---------------- boot ---------------- */
.boot-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: max(28px, env(safe-area-inset-top)) 16px 44px;
  text-align: center;
}
.boot-top {
  font-size: clamp(8px, 1.6vw, 12px);
  letter-spacing: 3px;
  color: var(--sky);
  margin-top: 30px;
}
.boot-start {
  pointer-events: auto;
  background: none;
  border: 0;
  font-size: clamp(14px, 3vw, 24px);
  color: var(--gold);
  padding: 16px 20px;
  margin-top: auto;
  margin-bottom: 18px;
  text-shadow: 3px 3px 0 #a0005a;
}
.boot-legal {
  font-size: clamp(6px, 1.1vw, 9px);
  line-height: 1.9;
  color: #b9a8ff;
}

/* ---------------- hub ---------------- */
.hub-ui {
  position: absolute;
  inset: 0;
}
.hub-title {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 14px;
  right: 110px;
  font-size: clamp(9px, 1.7vw, 14px);
  color: #fff;
  line-height: 1.6;
}
.hub-title .blink {
  color: var(--gold);
}
.hub-tags {
  position: absolute;
  inset: 0;
}
.hub-tag {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 10px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #fff;
  transition: opacity 0.2s;
  will-change: transform;
}

.hub-panel {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  width: min(680px, calc(100% - 20px));
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.hub-arrow {
  flex: 0 0 44px;
  background: rgba(0, 0, 40, 0.75);
  border: 3px solid #fff;
  font-size: 14px;
  color: var(--gold);
}
.hub-arrow:active {
  transform: translateY(2px);
}
.hub-info {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 40, 0.78);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px #000, 6px 6px 0 rgba(0, 0, 0, 0.5);
  padding: 12px 12px 10px;
  text-align: center;
}
.hub-num {
  font-size: 8px;
  color: var(--sky);
  margin-bottom: 8px;
}
.hub-name {
  font-size: clamp(13px, 2.6vw, 20px);
  color: var(--gold);
  margin-bottom: 8px;
}
.hub-blurb {
  font-family: var(--vt);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.05;
  color: #e8e8ff;
  min-height: 2.1em;
  margin-bottom: 10px;
  text-shadow: none;
}
.hub-play {
  background: var(--hot);
  border: 3px solid #fff;
  padding: 10px 12px;
  font-size: clamp(9px, 1.6vw, 12px);
  width: 100%;
  box-shadow: 4px 4px 0 #000;
  animation: pulse 0.9s ease-in-out infinite alternate;
}
.hub-play.locked {
  background: #444a66;
  animation: none;
}
.hub-play:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}
@keyframes pulse {
  to {
    filter: brightness(1.25);
  }
}

/* ---------------- game HUD ---------------- */
.game-ui {
  position: absolute;
  inset: 0;
}
.g-top {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  right: 100px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: flex-start;
}
.g-label {
  display: block;
  font-size: 7px;
  color: var(--sky);
  margin-bottom: 5px;
}
.g-val {
  font-size: clamp(16px, 3vw, 26px);
  color: var(--gold);
}
.g-bestval {
  font-size: 11px;
}
.g-bar {
  width: clamp(90px, 16vw, 170px);
  height: 14px;
  border: 2px solid #fff;
  background: #200;
  box-shadow: 2px 2px 0 #000;
}
.g-fill {
  height: 100%;
  width: 100%;
  background: repeating-linear-gradient(90deg, #fff 0 6px, #cde 6px 8px);
  transition: width 0.1s linear;
}
.g-fill.low {
  background: #ff3030;
  animation: blink 0.4s steps(2, start) infinite;
}
.g-fill.shield {
  background: var(--gold);
}
.g-warn {
  position: absolute;
  top: 34%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: clamp(10px, 2.2vw, 16px);
  color: #fff;
  background: rgba(20, 90, 200, 0.75);
  padding: 10px 8px;
  animation: blink 0.35s steps(2, start) infinite;
}
.g-center {
  position: absolute;
  top: 40%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: clamp(30px, 8vw, 64px);
  color: var(--gold);
  text-shadow: 4px 4px 0 #a0005a, 6px 6px 0 #000;
}
.g-hint {
  position: absolute;
  bottom: 34px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: clamp(7px, 1.3vw, 10px);
  line-height: 2;
  padding: 0 10px;
}
.g-quit {
  position: absolute;
  top: max(58px, calc(env(safe-area-inset-top) + 48px));
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid #fff;
  font-size: 8px;
  padding: 7px 8px;
}
.g-over {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 24px));
  background: rgba(0, 0, 50, 0.9);
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px #000, 8px 8px 0 rgba(0, 0, 0, 0.6);
  padding: 14px 12px;
  text-align: center;
}
.g-over-title {
  font-size: clamp(14px, 3.2vw, 24px);
  color: #ff4a4a;
  margin-bottom: 10px;
  line-height: 1.3;
}
.g-over-line {
  font-family: var(--vt);
  font-size: 20px;
  color: #e8e8ff;
  margin-bottom: 10px;
  text-shadow: none;
}
.g-over-score {
  font-size: clamp(14px, 3vw, 20px);
  color: var(--gold);
  margin-bottom: 8px;
}
.g-over-best {
  font-size: 9px;
  color: var(--sky);
  margin-bottom: 12px;
}
.g-over-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.g-over-btns button {
  background: var(--hot);
  border: 3px solid #fff;
  padding: 10px 12px;
  font-size: 10px;
  box-shadow: 3px 3px 0 #000;
}
.g-over-btns .g-share {
  background: #1a8a3a;
}
.g-over-btns .g-home {
  background: #444a66;
}
.g-over-toast {
  font-size: 8px;
  color: var(--gold);
  margin-top: 12px;
  min-height: 8px;
}

.no-webgl .crt {
  display: none;
}

/* ============ THE HOMEPAGE (1998) ============ */
.geo {
  font-family: 'Comic Neue', 'Comic Sans MS', 'Comic Sans', cursive;
  color: #ffff66;
  padding: 24px 12px 40px;
  background-color: #000033;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90px 120px, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 150px 60px, #ffd 50%, transparent 51%),
    radial-gradient(1px 1px at 200px 170px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 60px 190px, #aaf 50%, transparent 51%);
  background-size: 220px 220px;
  border-top: 6px ridge #c0c0c0;
}
.geo a {
  color: #00ffff;
}
.geo a:visited {
  color: #ff66ff;
}

.geo-header {
  text-align: center;
  max-width: 980px;
  margin: 0 auto 22px;
}
.rainbow {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(22px, 5vw, 42px);
  line-height: 1.15;
  margin: 0 0 8px;
  background: linear-gradient(90deg, #f00, #f80, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow 3s linear infinite;
  text-shadow: none;
  filter: drop-shadow(2px 2px 0 #000);
}
@keyframes rainbow {
  to {
    background-position: 200% 0;
  }
}
.geo-sub {
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
  color: #ccc;
  margin: 0 0 12px;
}
.geo-marquee {
  display: block;
  background: #000;
  color: #00ff00;
  font-family: var(--vt);
  font-size: 22px;
  border: 3px inset #888;
  padding: 2px 0;
}
.construction {
  margin-top: 12px;
  padding: 8px;
  font-family: var(--px);
  font-size: 9px;
  line-height: 1.8;
  color: #000;
  background: repeating-linear-gradient(-45deg, #ffcc00 0 14px, #111 14px 28px);
}
.construction span,
.construction {
  text-shadow: none;
}
.construction > span {
  background: #ffcc00;
  padding: 2px 4px;
}

.geo-box {
  max-width: 980px;
  margin: 0 auto 26px;
  padding: 16px;
  background: rgba(0, 0, 80, 0.88);
  border: 5px outset #c0c0c0;
}
.geo-h2 {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(22px, 4vw, 30px);
  color: #ff00ff;
  text-align: center;
  margin: 0 0 14px;
  text-shadow: 2px 2px 0 #000;
}
.geo-box p {
  font-size: 18px;
  line-height: 1.45;
  color: #fff;
}

/* suspects */
.suspects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.suspect {
  background: #000;
  border: 4px ridge #ffcc00;
  padding: 10px;
  color: #fff;
}
.suspect-photo {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px inset #888;
  background: #222;
}
.suspect-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.in-game {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: #000;
  border: 2px solid #fff;
  padding: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.in-game span {
  font-family: var(--px);
  font-size: 6px;
  color: var(--gold);
}
.mugshot-px {
  width: 52px;
  height: auto;
  image-rendering: pixelated;
  display: block;
}
.suspect h3 {
  font-family: var(--px);
  font-size: 12px;
  color: var(--gold);
  margin: 12px 0 8px;
  line-height: 1.5;
}
.charges {
  margin: 0 0 8px;
  padding-left: 20px;
  font-size: 17px;
  line-height: 1.35;
}
.charges li::marker {
  content: '✖ ';
  color: #ff4040;
}
.suspect .status,
.suspect .disc {
  font-size: 15px;
  margin: 6px 0;
}
.red {
  color: #ff4040;
}
.green {
  color: #40ff60;
}
.blue {
  color: #40c8ff;
}

.geo-about blockquote {
  margin: 14px 0;
  padding: 12px 16px;
  border-left: 6px double #ff00ff;
  background: #000;
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
  font-size: 19px;
  color: #ffff99;
}
.geo-about cite {
  display: block;
  margin-top: 8px;
  color: #ccc;
}
.tiny {
  font-size: 13px !important;
  color: #aaa !important;
}

/* diploma */
.dip-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 720px) {
  .dip-wrap {
    grid-template-columns: 1fr;
  }
}
.dip-form,
.gb-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #fff;
  font-size: 17px;
}
.dip-form label,
.gb-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.geo input,
.geo select,
.geo textarea {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  padding: 6px;
  border: 3px inset #c0c0c0;
  background: #fff;
  color: #000;
  width: 100%;
}
.dip-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.geo-btn {
  font-family: 'Comic Neue', 'Comic Sans MS', cursive;
  font-weight: 700;
  font-size: 16px;
  color: #000;
  background: #c0c0c0;
  border: 3px outset #fff;
  padding: 8px 12px;
}
.geo-btn:active {
  border-style: inset;
}
.geo-btn.big {
  font-size: 18px;
  padding: 12px 16px;
  max-width: 100%;
}
.dip-canvas {
  width: 100%;
  height: auto;
  border: 4px ridge #ffcc00;
  background: #f6ecd0;
}

/* guestbook */
.gb-entry {
  background: #fff;
  color: #000;
  border: 2px solid #000;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-family: 'Times New Roman', Times, serif;
}
.gb-entry p {
  color: #000;
  margin: 4px 0 0;
  font-size: 17px;
}
.gb-meta {
  font-size: 14px;
  color: #000080;
  border-bottom: 1px dotted #888;
  padding-bottom: 4px;
}
.gb-form {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 3px groove #c0c0c0;
}
.gb-form .geo-btn {
  align-self: flex-start;
}
.gb-error {
  font-family: 'Courier New', monospace;
  background: #c0c0c0;
  color: #000 !important;
  border: 3px outset #fff;
  padding: 10px;
  font-size: 15px !important;
}

/* merch */
.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.merch-grid figure {
  position: relative;
  margin: 0;
  background: #000;
  border: 3px ridge #c0c0c0;
  padding: 6px;
  text-align: center;
}
.merch-grid img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
}
.merch-grid figcaption {
  font-size: 14px;
  color: #fff;
  margin-top: 6px;
}
.stamp {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  font-family: var(--px);
  font-size: 11px;
  color: #ff2020;
  border: 3px solid #ff2020;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

/* footer */
.geo-footer {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #fff;
}
.counter-wrap {
  font-family: 'Times New Roman', Times, serif;
  font-size: 18px;
}
.hit-counter {
  display: inline-flex;
  gap: 2px;
  margin-top: 6px;
  padding: 3px;
  background: #222;
  border: 2px inset #888;
}
.hit-counter span {
  font-family: var(--vt);
  font-size: 26px;
  line-height: 1;
  background: #000;
  color: #ff2020;
  padding: 2px 5px;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.badge {
  width: 88px;
  height: 31px;
  display: grid;
  place-items: center;
  font-family: Verdana, sans-serif;
  font-size: 8px;
  font-weight: 700;
  border: 2px outset #ccc;
  text-align: center;
  line-height: 1.1;
}
.b1 { background: #000080; color: #fff; }
.b2 { background: #fff; color: #000; }
.b3 { background: #008000; color: #ff0; }
.b4 { background: #800000; color: #fff; }
.webring {
  font-family: 'Times New Roman', Times, serif;
  font-size: 17px;
}
