:root {
  --gray: #c0c0c0;
  --gray-dark: #808080;
  --navy: #000080;
  --navy-2: #1084d0;
  --pink: #ff2bd6;
  --cyan: #00f0ff;
  --lime: #c8ff00;
  --gold: #ffd000;
  --red: #de2910;
  --green: #2f6b32;
  --win-face: #d4d0c8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Noto Sans SC", Tahoma, "MS Sans Serif", sans-serif;
  background: #120018;
  color: #111;
  overflow: hidden;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28'><polygon points='14,1 17,10 27,10 19,16 22,26 14,20 6,26 9,16 1,10 11,10' fill='%23ffd000' stroke='%23000' stroke-width='1.4'/></svg>") 14 14, auto;
}
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.crt {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 9000;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.08) 0px,
    rgba(0,0,0,0.08) 1px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: multiply;
}
.vignette {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 8999;
  box-shadow: inset 0 0 180px 40px rgba(0,0,0,0.55);
}

.ticker {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 28px;
  background: linear-gradient(90deg, #de2910, #ff2bd6, #000080);
  color: #fff;
  overflow: hidden;
  border-bottom: 2px solid #fff;
  font-family: "Silkscreen", "Noto Sans SC", monospace;
  font-size: 12px;
  letter-spacing: 1px;
  pointer-events: none;
}
.ticker-track {
  display: flex; width: max-content;
  animation: marquee 28s linear infinite;
  white-space: nowrap;
  line-height: 28px;
  padding-left: 100%;
}
.ticker-track span { padding-right: 4rem; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.desktop {
  position: relative;
  height: 100vh;
  padding: 36px 8px 48px;
  overflow: hidden;
}
.wallpaper {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(18,0,24,0.35), rgba(80,0,90,0.25)),
    url("../img/hero-collage.png") center / cover no-repeat;
  filter: saturate(1.35) contrast(1.08);
}
.warp {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 30%, rgba(18,0,40,0.45) 100%),
    repeating-conic-gradient(from 0deg, transparent 0 8deg, rgba(255,43,214,0.07) 8deg 9deg);
  animation: spin 48s linear infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icons {
  position: relative; z-index: 5;
  display: flex; flex-direction: column; gap: 10px;
  width: 92px; padding: 4px;
}
.icon {
  background: none; border: 1px dotted transparent;
  color: #fff;
  text-shadow: 1px 1px 0 #000, 0 0 8px #000;
  font-family: "Noto Sans SC", Tahoma, sans-serif;
  font-size: 11px;
  width: 88px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.icon:focus, .icon:hover { border-color: #fff; background: rgba(0,0,128,0.35); }
.icon-art {
  width: 32px; height: 32px;
  image-rendering: pixelated;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.65));
  flex-shrink: 0;
}

.sticker {
  position: absolute; z-index: 4; pointer-events: none;
  width: 110px; height: 110px; object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 4px 4px 0 #000, 0 0 18px #ff2bd6;
  animation: floaty 5s ease-in-out infinite;
}
.sticker-a { right: 6%; top: 12%; transform: rotate(8deg); }
.sticker-b { right: 18%; bottom: 18%; width: 90px; height: 90px; animation-delay: -1.5s; }
.sticker-c { left: 10%; bottom: 22%; width: 96px; height: 96px; transform: rotate(-7deg); animation-delay: -3s; }
@keyframes floaty {
  0%,100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

.speech {
  position: absolute; z-index: 6; pointer-events: none;
  background: #fff;
  border: 2px solid #000;
  padding: 6px 10px;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  box-shadow: 3px 3px 0 #000;
  animation: pop 2.8s ease-in-out infinite;
}
.s1 { left: 42%; top: 10%; color: #de2910; }
.s2 { right: 28%; top: 38%; color: #c00; }
.s3 { left: 22%; bottom: 16%; }
.s4 { right: 8%; bottom: 28%; }
@keyframes pop {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.stars i {
  position: absolute;
  width: 14px; height: 14px;
  background: #ffd000;
  clip-path: polygon(50% 0, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0 50%, 39% 35%);
  filter: drop-shadow(0 0 6px #ffd000);
  animation: twinkle 1.6s ease-in-out infinite;
  z-index: 3;
  pointer-events: none;
}
.stars i:nth-child(1) { left: 22%; top: 14%; }
.stars i:nth-child(2) { left: 48%; top: 8%; animation-delay: -.3s; }
.stars i:nth-child(3) { left: 72%; top: 18%; animation-delay: -.6s; }
.stars i:nth-child(4) { left: 88%; top: 40%; animation-delay: -.9s; }
.stars i:nth-child(5) { left: 16%; top: 48%; animation-delay: -.2s; }
.stars i:nth-child(6) { left: 54%; top: 58%; animation-delay: -1.1s; }
.stars i:nth-child(7) { left: 38%; top: 72%; animation-delay: -.5s; }
.stars i:nth-child(8) { left: 80%; top: 70%; animation-delay: -.8s; }
.stars i:nth-child(9) { left: 6%; top: 28%; animation-delay: -1.4s; }
.stars i:nth-child(10) { left: 63%; top: 32%; animation-delay: -.1s; }
@keyframes twinkle {
  0%,100% { opacity: 1; transform: scale(1) rotate(0deg); }
  50% { opacity: .25; transform: scale(1.4) rotate(20deg); }
}

.cd {
  position: absolute; right: 8%; top: 44%; z-index: 4;
  width: 72px; height: 72px; border-radius: 50%;
  background: conic-gradient(#ff2bd6, #00f0ff, #ffd000, #c8ff00, #ff2bd6);
  box-shadow: 0 0 24px #00f0ff, inset 0 0 0 18px rgba(255,255,255,0.25);
  animation: spin 4s linear infinite;
  pointer-events: none;
}
.cd::after {
  content: "";
  position: absolute; inset: 28px;
  background: #111; border-radius: 50%;
}

.win {
  position: absolute; z-index: 20;
  background: var(--gray);
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.55), 0 0 0 1px #000;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 90px);
}
.win.hidden { display: none; }
.win.active { z-index: 40; }
.titlebar {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 4px;
  background: linear-gradient(90deg, var(--navy), var(--navy-2));
  color: #fff;
  font-family: Tahoma, "Noto Sans SC", sans-serif;
  font-size: 12px; font-weight: 700;
  user-select: none;
  cursor: grab;
}
.titlebar.redbar { background: linear-gradient(90deg, #7a0000, #de2910); }
.tb-ico {
  width: 14px; height: 14px;
  background: linear-gradient(#ffd000, #de2910);
  border: 1px solid #fff;
}
.tb-btns { margin-left: auto; display: flex; gap: 2px; }
.tb-btns button {
  width: 16px; height: 14px;
  background: var(--gray);
  border: 1px solid;
  border-color: #fff #000 #000 #fff;
  font-size: 10px; line-height: 10px;
  font-weight: 900;
}
.tb-x { background: #e44 !important; color: #fff; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 6px;
  background: var(--gray);
  border-bottom: 1px solid #808080;
}
.toolbar .btn { font-size: 8px; padding: 5px 8px; }
.win-body {
  padding: 10px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.2)),
    repeating-linear-gradient(90deg, #f4e8ff 0 8px, #e8f7ff 8px 16px);
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  margin: 3px;
}

.hero-body { background: linear-gradient(160deg, #1a0030, #3a0066 40%, #001a33); color: #fff; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: center;
}
.wordmark {
  width: min(280px, 100%);
  filter: drop-shadow(0 0 16px #ff8a00);
  margin-bottom: 4px;
}
.glitch {
  font-family: "Bungee", sans-serif;
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1;
  background: linear-gradient(180deg, #ff8ad8, #7c5cff 45%, #00e5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(3px 3px 0 #000) drop-shadow(0 0 14px #ff2bd6);
  position: relative;
}
.tag {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: var(--gold);
  margin: 8px 0 12px;
  letter-spacing: 0.5px;
}
.fee-row { display: flex; gap: 10px; margin-bottom: 12px; }
.fee {
  flex: 1;
  background: linear-gradient(#00f0ff, #0077aa);
  border: 3px solid #fff;
  box-shadow: 4px 4px 0 #000, 0 0 16px #00f0ff;
  text-align: center;
  padding: 8px 4px;
  color: #001018;
}
.fee.sell {
  background: linear-gradient(#ff2bd6, #a00a70);
  color: #fff;
  box-shadow: 4px 4px 0 #000, 0 0 16px #ff2bd6;
}
.fee b { display: block; font-family: "Bungee", sans-serif; font-size: 32px; line-height: 1; }
.fee span { font-family: "Silkscreen", monospace; font-size: 11px; }
.chain-pill {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 8px;
  font-family: "Silkscreen", monospace;
  font-size: 10px;
  color: #111;
  background: linear-gradient(#f3ba2f, #c9940a);
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 #000;
}
.xaut-bar {
  margin: 0 0 12px;
  padding: 8px 10px;
  text-align: center;
  font-family: "Silkscreen", monospace;
  font-size: 12px;
  color: #1a1200;
  background: linear-gradient(90deg, #ffe27a, #f3ba2f, #ffe27a);
  border: 3px solid #fff;
  box-shadow: 3px 3px 0 #000, 0 0 16px #f3ba2f;
}
.xaut-bar.compact { margin: 0 0 10px; font-size: 11px; }
.net-box {
  background: #fff;
  border: 2px inset #808080;
  padding: 8px 10px;
  margin-bottom: 12px;
  font-family: "VT323", monospace;
  font-size: 17px;
  line-height: 1.35;
}
.net-box p { margin: 0; }
.buy-body code {
  background: #111;
  color: #c8ff00;
  padding: 0 4px;
}
.blurb { font-size: 14px; line-height: 1.45; color: #f3e8ff; margin-bottom: 12px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.btn {
  display: inline-block;
  background: var(--gray);
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  padding: 8px 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  color: #111;
  text-decoration: none;
  box-shadow: 2px 2px 0 #000;
}
.btn:active { border-color: #000 #fff #fff #000; translate: 1px 1px; }
.btn.neon {
  background: linear-gradient(#c8ff00, #7ad000);
  color: #111;
  text-shadow: none;
}
.btn.red { background: linear-gradient(#ff5a5a, #de2910); color: #fff; }
.ca-line { font-size: 11px; color: #9cf; word-break: break-all; }
.ca-line code { color: var(--lime); }
.hero-pic img {
  width: 100%;
  border: 4px solid #fff;
  box-shadow: 6px 6px 0 #000, 0 0 24px #00f0ff;
  object-fit: cover;
  max-height: 340px;
}
.caption {
  font-family: "VT323", monospace;
  font-size: 16px;
  text-align: center;
  color: var(--cyan);
  margin-top: 6px;
}

.notepad h2, .buy-body h2, .manifesto h2 {
  font-family: "Bungee", sans-serif;
  font-size: 18px;
  color: var(--navy);
  margin-bottom: 10px;
}
.tax-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tax-card {
  background: linear-gradient(#00e5ff, #0077c8);
  border: 3px solid #000;
  text-align: center;
  padding: 10px 4px;
  color: #001;
  box-shadow: 3px 3px 0 #000;
}
.tax-card.sell { background: linear-gradient(#ff4ad0, #c00a80); color: #fff; }
.tax-card span { font-family: "Silkscreen", monospace; font-size: 11px; }
.tax-card strong { display: block; font-family: "Bungee", sans-serif; font-size: 36px; }
.tax-card em { font-style: normal; font-size: 12px; }
.toko { list-style: none; font-size: 13px; line-height: 1.5; }
.toko li { margin-bottom: 6px; padding-left: 8px; border-left: 4px solid var(--pink); }

.credit-body { background: #140000; color: #f5e6c8; text-align: center; }
.score-label { font-family: "Press Start 2P", monospace; font-size: 8px; color: #de2910; }
.led {
  font-family: "VT323", monospace;
  font-size: 56px;
  line-height: 1;
  color: #39ff14;
  text-shadow: 0 0 12px #39ff14, 0 0 30px #0f0;
  background: #050;
  border: 4px inset #333;
  margin: 6px 0;
  letter-spacing: 4px;
}
.status {
  font-family: "Silkscreen", monospace;
  font-size: 11px;
  color: #39ff14;
  margin-bottom: 8px;
}
.credit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.credit-actions button {
  background: var(--gray);
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  padding: 7px 4px;
  font-size: 11px;
  font-weight: 700;
}
.credit-actions .bad { background: #400; color: #faa; }
.credit-body img { border: 2px solid #de2910; margin-top: 6px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.gallery button {
  border: 2px solid #000;
  padding: 0;
  background: #000;
  overflow: hidden;
}
.gallery img {
  width: 100%; height: 110px;
  object-fit: cover;
  filter: saturate(1.2) contrast(1.05);
  transition: transform 0.2s;
}
.gallery button:hover img { transform: scale(1.08); }

.ie-bar {
  background: #fff;
  border: 2px inset #808080;
  font-family: "VT323", monospace;
  font-size: 18px;
  padding: 2px 8px;
  margin-bottom: 10px;
  color: #00c;
}
.steps { padding-left: 18px; font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.steps li { margin-bottom: 8px; }

.manifesto { background: #f4ecd4 url("../img/credit-green.png") right 8px top 8px / 90px no-repeat; }
.manifesto img { display: none; }
.manifesto p { margin-bottom: 8px; font-size: 14px; }
.stamp {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 14px;
  border: 4px solid #de2910;
  color: #de2910;
  font-family: "Bungee", sans-serif;
  transform: rotate(-8deg);
}

.net-body { background: #001a12; color: #c8ff00; text-align: center; }
.net-body p { font-family: "Press Start 2P", monospace; font-size: 8px; margin-bottom: 10px; line-height: 1.6; }
.net-link {
  display: block;
  margin: 6px 0;
  padding: 8px;
  background: var(--gray);
  color: #111;
  text-decoration: none;
  font-family: "Silkscreen", monospace;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
}
.net-body img { margin-top: 10px; border: 3px solid #c8ff00; }

.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  height: 36px;
  background: var(--gray);
  border-top: 2px solid #fff;
  display: flex; align-items: center; gap: 6px;
  padding: 0 4px;
  box-shadow: inset 0 1px 0 #fff;
}
.start {
  display: flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  font-family: Tahoma, sans-serif;
  font-weight: 900;
  font-size: 13px;
  background: var(--gray);
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
}
.start span {
  width: 16px; height: 16px;
  background: conic-gradient(#de2910 0 25%, #ffd000 0 50%, #2f6b32 0 75%, #00f0ff 0);
  border: 1px solid #000;
}
.tray-wins { display: flex; gap: 4px; flex: 1; overflow: hidden; }
.tray-btn {
  height: 26px; min-width: 110px; max-width: 160px;
  padding: 0 8px;
  font-size: 11px;
  text-align: left;
  background: var(--gray);
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tray-btn.on { border-color: #000 #fff #fff #000; background: #b8b8b8; }
.systray {
  display: flex; align-items: center; gap: 10px;
  border: 2px inset #808080;
  height: 26px; padding: 0 8px;
  font-family: "VT323", monospace;
  font-size: 16px;
}
.pulse-cam {
  width: 8px; height: 8px; border-radius: 50%;
  background: #de2910;
  box-shadow: 0 0 8px #de2910;
  animation: blink 1.2s infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }
.credit-mini { color: #060; }
.mute-btn {
  height: 20px; width: 24px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  background: var(--gray);
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  cursor: pointer;
}
.mute-btn:active { border-color: #000 #fff #fff #000; }

.start-menu {
  position: fixed; left: 4px; bottom: 36px; z-index: 90;
  width: 220px;
  background: var(--gray);
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  display: flex; flex-direction: column;
  box-shadow: 4px 4px 0 #000;
}
.start-menu.hidden { display: none; }
.start-banner {
  background: linear-gradient(#000080, #de2910);
  color: #fff;
  font-family: "Bungee", sans-serif;
  font-size: 12px;
  padding: 14px 10px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  position: absolute; left: 0; top: 0; bottom: 0; width: 32px;
}
.start-menu button {
  margin-left: 32px;
  text-align: left;
  background: none; border: 0;
  padding: 8px 10px;
  font-size: 13px;
}
.start-menu button:hover { background: var(--navy); color: #fff; }

.popup {
  position: fixed; z-index: 100;
  width: 280px;
  background: var(--gray);
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  box-shadow: 6px 6px 0 #000;
}
.popup .titlebar { cursor: default; }
.popup .body { padding: 12px; font-size: 13px; }
.popup .ok {
  display: block; margin: 8px auto 4px;
  min-width: 72px;
  background: var(--gray);
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  padding: 4px 16px;
}

.boot {
  position: fixed; inset: 0; z-index: 200;
  background: #000;
  color: #39ff14;
  display: grid; place-items: center;
  font-family: "VT323", monospace;
}
.boot.gone { animation: bootout 0.6s forwards; pointer-events: none; }
@keyframes bootout { to { opacity: 0; visibility: hidden; } }
.boot-inner { text-align: center; width: min(420px, 90vw); }
.boot-logo { width: 240px; margin: 0 auto 12px; filter: drop-shadow(0 0 18px #ff8a00); }
.boot-os { font-family: "Press Start 2P", monospace; font-size: 14px; color: #00f0ff; }
.boot-sub { margin: 16px 0 8px; font-size: 22px; }
.boot-bar { height: 22px; border: 2px solid #39ff14; background: #020; }
.boot-fill { height: 100%; width: 0%; background: repeating-linear-gradient(90deg, #39ff14 0 10px, #0a0 10px 14px); }
.boot-hint { margin-top: 10px; color: #0a0; font-size: 16px; }

.lightbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,0.82);
  display: grid; place-items: center;
}
.lightbox.hidden { display: none; }
.lightbox img { max-width: 90vw; max-height: 85vh; border: 6px solid #fff; box-shadow: 0 0 40px #ff2bd6; }
.lb-x {
  position: absolute; top: 16px; right: 20px;
  width: 40px; height: 40px;
  background: #de2910; color: #fff; border: 3px solid #fff;
  font-size: 28px; line-height: 1;
}

.sparkle-layer span {
  position: fixed; pointer-events: none; z-index: 70;
  width: 10px; height: 10px;
  background: #ffd000;
  clip-path: polygon(50% 0, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0 50%, 39% 35%);
  animation: spark 0.7s linear forwards;
}
@keyframes spark { to { opacity: 0; transform: scale(2) translateY(-16px); } }

@media (max-width: 860px) {
  body { overflow: auto; }
  .desktop {
    height: auto; min-height: 100vh;
    overflow: visible;
    display: flex; flex-direction: column; gap: 12px;
    padding-bottom: 56px;
  }
  .icons { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .win, .win.hidden {
    position: relative !important;
    left: auto !important; top: auto !important;
    width: 100% !important;
    max-height: none;
    display: flex;
  }
  .sticker, .speech, .cd, .warp { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .titlebar { cursor: default; }
}
