:root {
  --lime: #39ff14;
  --yellow: #ffff00;
  --magenta: #ff00ff;
  --cyan: #00ffff;
  --red: #ff3030;
  --silver: #c0c0c0;
  --shade: #808080;
  --navy: #000080;
  --win-font: Tahoma, "MS Sans Serif", Geneva, Verdana, sans-serif;
  --mono: "Courier New", Courier, monospace;
  --loud: Impact, "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --comic: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  color-scheme: dark;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { background: #000 url(/gif/stars-bg.gif) repeat; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--lime);
  font: 18px/1.4 "Times New Roman", Times, serif;
  text-align: center;
  cursor: url(/cursor.png) 0 0, auto;
  cursor: -webkit-image-set(url(/cursor.png) 1x, url(/cursor@2x.png) 2x) 0 0, auto;
}
a, button, .btn { cursor: pointer; }

img { max-width: 100%; height: auto; image-rendering: pixelated; vertical-align: middle; }

a { color: var(--cyan); }

/* ---- the hit counters: first thing on the page ---- */

.hits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 28px;
  padding: 10px 16px 0;
}
.rainbow { height: 14px; background: url(/gif/rainbow-bar.gif) repeat-x center / auto 100%; }
.hit p { margin: 4px 0 0; font: bold 15px var(--mono); color: var(--yellow); letter-spacing: 1px; }
.hit-gif { width: 90px; }

/* a 1997 hit counter, one box per digit */
.odo {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: #000;
  border: 3px inset var(--shade);
}
.odo span {
  min-width: 0.78em;
  padding: 0 2px;
  background: linear-gradient(#3a3a3a, #000 48%, #000 52%, #262626);
  color: #fff;
  font: bold clamp(22px, 6.4vw, 30px)/1.1 var(--mono);
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.55);
}

.ticker {
  display: block;
  padding: 5px 0;
  background: var(--navy);
  color: var(--yellow);
  font: bold 16px var(--mono);
  border-bottom: 4px ridge var(--magenta);
}

/* ---- header ---- */

.top { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 16px 16px 0; }
.top h1 { margin: 0; line-height: 0; min-width: 0; }
.flank { flex: none; }

.sky { position: relative; height: 76px; overflow: hidden; }
.fly { position: absolute; }
.fly.east { top: 2px; left: -160px; animation: east 13s linear infinite, bob 1.4s ease-in-out infinite alternate; }
.fly.west { top: 14px; left: 100%; width: 150px; animation: west 21s linear 3s infinite; }
@keyframes east { to { left: 100%; } }
@keyframes west { to { left: -220px; } }
@keyframes bob { to { translate: 0 8px; } }

.warning { margin: 4px 16px 18px; line-height: 0; }

/* ---- three columns: sidebars around the market ---- */

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 640px) 220px;
  grid-template-areas: "left mid right";
  justify-content: center;
  align-items: start;
  gap: 20px;
  padding: 0 16px;
}
.mid { grid-area: mid; min-width: 0; }
.side { display: flex; flex-direction: column; gap: 16px; }
.side.left { grid-area: left; }
.side.right { grid-area: right; }

.box {
  padding: 0 10px 10px;
  background: rgba(0, 0, 0, 0.85);
  border: 4px ridge var(--silver);
}
.box h3 {
  margin: 0 -10px 10px;
  padding: 3px 4px;
  background: var(--navy);
  color: var(--yellow);
  font: bold 14px var(--mono);
  letter-spacing: 1px;
}
.box > img:first-child { margin-top: 10px; }
.small { margin: 6px 0 0; font: 14px var(--comic); color: var(--cyan); }
.name { margin: 6px 0 0; font: 22px var(--loud); color: var(--magenta); letter-spacing: 2px; }
.lcd {
  margin: 0;
  padding: 6px 4px;
  background: #0a1a0a;
  color: var(--lime);
  font: bold 26px var(--mono);
  letter-spacing: 2px;
  text-shadow: 0 0 8px var(--lime);
  border: 2px inset var(--shade);
}

/* radar: a sweep and three blips that light up as it passes */
.radar {
  position: relative;
  width: 150px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid var(--lime);
  background:
    radial-gradient(circle, transparent 32%, rgba(57, 255, 20, 0.35) 33%, transparent 34%, transparent 65%, rgba(57, 255, 20, 0.35) 66%, transparent 67%),
    linear-gradient(transparent calc(50% - 0.5px), rgba(57, 255, 20, 0.35) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(57, 255, 20, 0.35) 50%, transparent calc(50% + 0.5px)),
    #001400;
  overflow: hidden;
}
.sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(57, 255, 20, 0.6), transparent 70deg);
  animation: spin 3s linear infinite;
}
.radar b {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 7px;
  height: 7px;
  margin: -3px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  opacity: 0;
  animation: blip 3s linear var(--d) infinite;
}
@keyframes spin { to { rotate: 1turn; } }
@keyframes blip { 0% { opacity: 1; } 70% { opacity: 0.1; } 100% { opacity: 0; } }

/* ---- the market window ---- */

.window {
  position: relative;
  padding: 3px;
  background: var(--silver);
  border: 2px solid;
  border-color: #dfdfdf #0a0a0a #0a0a0a #dfdfdf;
  box-shadow: inset 1px 1px #fff, inset -1px -1px var(--shade), 0 0 40px rgba(57, 255, 20, 0.25);
}

.titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 3px 2px 6px;
  background: linear-gradient(90deg, var(--navy), #1084d0);
  color: #fff;
  font: bold 13px var(--win-font);
}
.tb { display: flex; gap: 2px; }
.tb i {
  width: 16px;
  height: 14px;
  background: var(--silver);
  color: #000;
  font: bold 11px/12px var(--win-font);
  font-style: normal;
  border: 1px solid; border-color: #fff #0a0a0a #0a0a0a #fff;
}
.menubar { display: flex; gap: 14px; padding: 2px 6px; color: #000; font: 13px var(--win-font); text-align: left; }

.pane {
  position: relative;
  padding: 18px 20px 20px;
  background: #000;
  border: 2px solid; border-color: var(--shade) #fff #fff var(--shade);
}

.new { position: absolute; top: 8px; right: 10px; width: 80px; }

.kicker { margin: 0; color: var(--cyan); font: bold 14px var(--mono); letter-spacing: 2px; }

h2 { margin: 8px 0 14px; color: var(--yellow); font-size: clamp(22px, 5.4vw, 30px); line-height: 1.2; text-wrap: balance; }

.odds { display: flex; justify-content: center; gap: clamp(18px, 6vw, 56px); }
.odds p { margin: 0; display: flex; flex-direction: column; }
.odds span { font: bold 16px var(--mono); letter-spacing: 3px; }
.odds b { font: clamp(46px, 13vw, 78px)/1 var(--loud); }
.yes { color: var(--lime); text-shadow: 0 0 14px rgba(57, 255, 20, 0.6); }
.no { color: var(--red); text-shadow: 0 0 14px rgba(255, 48, 48, 0.5); }

.bar {
  position: relative;
  height: 24px;
  margin: 16px 0 12px;
  padding: 2px;
  background: #000;
  border: 2px solid; border-color: var(--shade) #fff #fff var(--shade);
}
.fill { width: 0; height: 100%; background: repeating-linear-gradient(90deg, var(--lime) 0 9px, transparent 9px 12px); }
#pct { position: absolute; right: 8px; top: 2px; font: bold 14px/16px var(--mono); color: var(--lime); }

/* the chart: an oscilloscope of the YES price */
.chart { margin: 4px 0 14px; text-align: left; }
.tabs { display: flex; align-items: end; gap: 3px; }
.tabs button {
  padding: 2px 12px;
  background: var(--silver);
  color: #000;
  font: bold 12px var(--win-font);
  border: 2px solid; border-color: #fff #0a0a0a #0a0a0a #fff;
}
.tabs button[aria-pressed="true"] { background: #fff; border-color: #0a0a0a #fff #fff #0a0a0a; }
.tabs button:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.tab-note { margin-left: auto; color: var(--cyan); font: bold 12px var(--mono); letter-spacing: 1px; }

.plot {
  position: relative;
  height: 190px;
  margin-top: 3px;
  background: #001400;
  border: 2px solid; border-color: var(--shade) #fff #fff var(--shade);
  overflow: hidden;
  touch-action: pan-y;
}
.plot::after { /* scanlines */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, 0.28) 2px 3px);
  pointer-events: none;
}
.plot svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 3px rgba(57, 255, 20, 0.8)); }
.plot .gridline { stroke: rgba(57, 255, 20, 0.22); stroke-width: 1; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.ylab, .xlab { position: absolute; color: #8f8; font: 11px var(--mono); white-space: nowrap; pointer-events: none; }
.ylab { left: 4px; transform: translateY(-110%); }
.xlab { bottom: 2px; }
.cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--yellow); pointer-events: none; }
.dot {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -4.5px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px var(--yellow);
  pointer-events: none;
}
.nosignal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  background: url(/gif/static.gif);
  color: #fff;
  font: bold 22px var(--mono);
  text-shadow: 0 0 6px #000, 0 0 2px #000;
}

.statusbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 3px 0 0;
  padding: 1px 6px;
  background: var(--silver);
  color: #000;
  font: 12px var(--win-font);
  border: 1px solid; border-color: var(--shade) #fff #fff var(--shade);
}

.clock { margin: 0 0 16px; color: var(--cyan); font: bold 17px var(--mono); }
.clock.done { color: var(--yellow); }

/* Win95 button */
.btn {
  display: inline-block;
  padding: 6px 16px;
  background: var(--silver);
  color: #000;
  font: bold 15px var(--win-font);
  text-decoration: none;
  border: 2px solid; border-color: #fff #0a0a0a #0a0a0a #fff;
  box-shadow: inset -1px -1px var(--shade), inset 1px 1px #dfdfdf;
}
.btn:active { border-color: #0a0a0a #fff #fff #0a0a0a; box-shadow: inset 1px 1px var(--shade); }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }

/* ---- under the market ---- */

.panel {
  position: relative;
  margin: 22px 0 0;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.85);
  border: 6px ridge var(--magenta);
}

.claim { border-color: var(--yellow); }
.claim h3 { margin: 0; color: var(--cyan); font: 22px var(--loud); letter-spacing: 3px; }
.answer { margin: 2px 0 8px; color: var(--yellow); font: clamp(34px, 9vw, 46px)/1.1 var(--loud); letter-spacing: 2px; text-shadow: 3px 3px 0 var(--red); }
.claim ol { margin: 0 auto; padding: 0; max-width: 470px; list-style: none; counter-reset: step; text-align: left; }
.claim li { counter-increment: step; margin: 6px 0; padding-left: 30px; text-indent: -30px; text-wrap: pretty; }
.claim li::before { content: counter(step) ". "; display: inline-block; width: 30px; text-indent: 0; color: var(--yellow); font-weight: bold; }
.claim b { color: var(--yellow); }
.claim .fine { margin: 10px 0 0; color: var(--silver); font-size: 15px; }

.ca { border-color: var(--cyan); }
.ufo-bar { margin: 18px 0 0; line-height: 0; }
.ca-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ca-label { font: bold 18px var(--mono); color: var(--yellow); }
.field {
  min-width: 0;
  padding: 4px 8px;
  background: #fff;
  color: #000;
  font: bold clamp(11px, 3.3vw, 15px) var(--mono);
  overflow-wrap: anywhere;
  border: 2px solid; border-color: var(--shade) #fff #fff var(--shade);
}
.ca-row .btn { padding: 4px 10px; font-size: 13px; }

.buy {
  margin-top: 14px;
  padding: 10px 30px;
  background: var(--red);
  color: var(--yellow);
  font: 26px var(--loud);
  letter-spacing: 2px;
}
.buy[aria-disabled="true"] { background: var(--silver); color: var(--shade); cursor: default; font-size: 20px; }

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

/* ---- bottom ---- */

.fire { height: 50px; margin-top: 30px; background: url(/gif/fire-bar.gif) repeat-x center; }

footer { padding: 14px 16px 0; font: 13px var(--mono); color: var(--silver); }
.badges, .crew { display: flex; flex-wrap: wrap; align-items: end; justify-content: center; gap: 8px 16px; }
.badges img { width: 88px; image-rendering: pixelated; }
.crew { margin-top: 16px; gap: 10px 26px; }
.uc { margin-top: 14px; width: 260px; }
footer p { margin: 10px 0 0; }
.psst { color: #555; }
.peek { display: block; margin: 12px auto 0; }

/* ---- cursor sparkles and the invasion (fx.js) ---- */

.spark {
  position: fixed;
  z-index: 50;
  margin: -6px;
  font: bold 13px/1 var(--mono);
  font-style: normal;
  pointer-events: none;
  animation: spark 0.75s ease-out forwards;
}
@keyframes spark { to { opacity: 0; transform: translateY(26px) scale(0.4); } }

.invader { position: fixed; z-index: 60; pointer-events: none; left: -220px; animation: invade var(--t) linear forwards; }
@keyframes invade { to { left: calc(100vw + 40px); } }
.invasion-banner {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 40%;
  translate: -50% -50%;
  margin: 0;
  padding: 10px 22px;
  background: var(--red);
  color: var(--yellow);
  font: clamp(26px, 8vw, 54px) var(--loud);
  letter-spacing: 3px;
  border: 6px ridge var(--yellow);
  pointer-events: none;
}
body.shake { animation: shake 0.12s linear 8; }
@keyframes shake { 25% { translate: 4px 0; } 75% { translate: -4px 0; } }

/* ---- narrower: the market first, the sidebars under it two by two ---- */

@media (max-width: 1060px) {
  .layout {
    grid-template-columns: minmax(0, 640px);
    grid-template-areas: "mid" "left" "right";
  }
  .side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

@media (max-width: 760px) {
  .flank { display: none; }
  .hit-gif { display: none; }
  .pane { padding: 16px 12px 18px; }
  .new { top: 6px; right: 6px; width: 56px; }
  .panel { padding: 12px 12px; }
  .menubar { gap: 10px; }
  .side { gap: 10px; }
  .box { padding: 0 6px 8px; }
  .box h3 { margin: 0 -6px 8px; font-size: 12px; }
  .lcd { font-size: 20px; letter-spacing: 1px; }
  .plot { height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .blink, .fly, .sweep, .radar b, body.shake { animation: none; }
  .fly.east { left: calc(50% - 74px); }
  .fly.west, .rainbow { display: none; }
  .radar b { opacity: 1; }
}

/* ---- CASHOUT.EXE ---- */

.home-title { line-height: 0; }
.co { max-width: 620px; margin: 0 auto; padding: 0 16px; }
.co .pane { text-align: center; }
.co-status { margin: 0 0 14px; font: bold 16px var(--mono); color: var(--cyan); }
.co-status.ok { color: var(--lime); }
.co-status.bad { color: var(--yellow); }
.wallets { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.btn.big { padding: 10px 26px; font-size: 20px; }
.btn:disabled { background: var(--silver); color: var(--shade); text-shadow: 1px 1px #fff; cursor: default; }
.who { margin: 0; font: 14px var(--mono); color: var(--silver); }
.who code { color: var(--cyan); }
.link { padding: 0; background: none; border: 0; color: var(--cyan); font: inherit; text-decoration: underline; }
.have { margin: 6px 0 12px; font-size: 20px; }
.have b { color: var(--yellow); font: 26px var(--loud); letter-spacing: 1px; }
.amount { display: flex; justify-content: center; gap: 6px; }
.amount input {
  width: min(220px, 60vw);
  padding: 6px 10px;
  background: #000;
  color: var(--lime);
  font: bold 24px var(--mono);
  text-align: right;
  border: 2px solid; border-color: var(--shade) #fff #fff var(--shade);
}
.amount input:focus { outline: 1px dotted var(--yellow); }
.quote { min-height: 1.4em; margin: 10px 0 14px; font: 15px var(--mono); color: var(--lime); }
.quote.bad { color: var(--yellow); }
.log { margin: 18px auto 0; padding: 8px 12px 8px 30px; max-width: 480px; background: #001400; border: 2px solid; border-color: var(--shade) #fff #fff var(--shade); text-align: left; font: 14px var(--mono); }
.log li { margin: 3px 0; }
.result { margin: 14px 0 0; font: clamp(22px, 6vw, 30px)/1.2 var(--loud); letter-spacing: 1px; color: var(--yellow); text-shadow: 2px 2px 0 var(--red); overflow-wrap: anywhere; }
.result.ok { color: var(--lime); text-shadow: 2px 2px 0 #004400; }
.back { margin: 22px 0 0; }
.cashout-page footer { margin-top: 10px; }
.claim .cash { margin: 12px 0 0; }
