/* GONZOWIRE OS - desktop */
#desktop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 75% 20%, rgba(255,43,143,.45), transparent 55%),
    radial-gradient(ellipse at 15% 80%, rgba(20,227,255,.30), transparent 60%),
    linear-gradient(180deg, #5a2a10 0%, #3a1410 55%, #1c0908 100%);
  overflow: hidden;
}

/* Heat haze */
#desktop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/desert.svg");
  background-size: cover;
  background-position: bottom;
  opacity: .65;
  filter: hue-rotate(0deg);
  pointer-events: none;
}

/* Bats over the horizon */
.bats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
}
.bat {
  position: absolute;
  width: 16px; height: 10px;
  background: var(--ink);
  clip-path: polygon(0% 50%, 25% 0%, 50% 50%, 75% 0%, 100% 50%, 75% 100%, 50% 50%, 25% 100%);
  animation: flap 1.2s steps(2) infinite, drift 14s linear infinite;
}
@keyframes flap {
  0%,100% { transform: scaleY(1); }
  50%     { transform: scaleY(.4); }
}
@keyframes drift {
  0%   { transform: translate(-10vw, 0); }
  100% { transform: translate(110vw, -8vh); }
}

/* Top menu bar */
.menubar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 28px;
  background: linear-gradient(180deg, #ffe21a 0%, #d9b16c 100%);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  display: flex; align-items: center;
  padding: 0 14px;
  font-family: var(--display);
  font-size: 16px;
  z-index: 100;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.menubar .brand { font-weight: 900; color: var(--neon-blood); }
.menubar .item { margin-left: 20px; cursor: pointer; }
.menubar .item { position: relative; padding: 0 6px; height: 100%; display: flex; align-items: center; }
.menubar .item:hover, .menubar .item.open { background: var(--ink); color: var(--neon-yellow); }
.menubar .item .dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--ink);
  border: 2px solid var(--neon-yellow);
  min-width: 240px;
  font-family: var(--mono);
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  z-index: 200;
  box-shadow: 6px 6px 0 #000;
}
.menubar .item.open .dropdown { display: block; }
.menubar .item .dropdown a {
  display: block;
  padding: 8px 14px;
  color: var(--bone);
  border-bottom: 1px dashed #3a2614;
  cursor: pointer;
  border-color: var(--neon-pink);
}
.menubar .item .dropdown a:hover { background: var(--neon-pink); color: var(--ink); }
.menubar .item .dropdown a .hint { color: var(--neon-cyan); font-size: 12px; float: right; }
.menubar .item .dropdown hr { border: 0; border-top: 1px solid var(--sand); margin: 4px 0; }
.menubar .right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.menubar .clock { font-family: var(--mono); font-size: 18px; }
.menubar .ticker {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--neon-blood);
  background: var(--ink);
  padding: 2px 8px;
  border: 1px solid var(--neon-blood);
  max-width: 320px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.menubar .vibe {
  background: var(--ink); color: var(--neon-acid);
  padding: 2px 8px; border: 1px solid var(--neon-acid);
}

/* Desktop icons grid */
.icons {
  position: absolute;
  top: 50px; left: 24px;
  display: grid;
  grid-template-columns: 96px 96px;
  gap: 14px 18px;
  z-index: 5;
  max-height: calc(100vh - 80px);
}
.icon {
  width: 96px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 14px;
  text-shadow: 1px 1px 0 #000, 0 0 6px rgba(255,43,143,.4);
}
.icon .glyph {
  width: 64px; height: 64px;
  margin: 0 auto 6px;
  background: #2a1808;
  border: 2px solid var(--neon-yellow);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  color: var(--neon-yellow);
  box-shadow: 4px 4px 0 #000, inset 0 0 12px rgba(255,226,26,.25);
  transition: transform .12s;
  text-shadow: 0 0 8px rgba(255,226,26,.6);
}
.icon:hover .glyph {
  transform: translate(-1px,-1px) rotate(-1deg);
  background: var(--neon-pink);
  color: var(--ink);
  border-color: var(--neon-yellow);
}
.icon.selected .glyph { outline: 2px dashed var(--neon-cyan); }

/* Windows */
.window {
  position: absolute;
  min-width: 320px;
  min-height: 180px;
  background: #3a2614;
  border: 2px solid var(--win-border);
  box-shadow: var(--win-shadow);
  font-family: var(--mono);
  color: var(--bone);
  display: flex; flex-direction: column;
  z-index: 10;
}
.window.focused { box-shadow: 0 0 0 2px #120a05, 0 0 32px rgba(20,227,255,.45), 8px 8px 0 #000; }
.window.maxed {
  border-width: 0 0 2px 0;
  box-shadow: 0 0 0 2px #120a05, 0 0 48px rgba(255,43,143,.55);
}
.window.maxed .titlebar { cursor: default; }
.window.maxed .body { max-height: none; height: 100%; }

/* Resize handles */
.window .rs { position: absolute; z-index: 5; }
.window .rs-n  { top: -4px; left: 12px; right: 12px; height: 8px; cursor: ns-resize; }
.window .rs-s  { bottom: -4px; left: 12px; right: 12px; height: 8px; cursor: ns-resize; }
.window .rs-e  { right: -4px; top: 30px; bottom: 12px; width: 8px; cursor: ew-resize; }
.window .rs-w  { left: -4px; top: 30px; bottom: 12px; width: 8px; cursor: ew-resize; }
.window .rs-ne { top: -6px; right: -6px; width: 14px; height: 14px; cursor: nesw-resize; }
.window .rs-nw { top: -6px; left: -6px; width: 14px; height: 14px; cursor: nwse-resize; }
.window .rs-se { bottom: -6px; right: -6px; width: 14px; height: 14px; cursor: nwse-resize; background: var(--neon-yellow); border: 2px solid var(--ink); }
.window .rs-sw { bottom: -6px; left: -6px; width: 14px; height: 14px; cursor: nesw-resize; }
.window.maxed .rs { display: none; }
.window .titlebar {
  background: repeating-linear-gradient(
    90deg,
    var(--neon-pink) 0 8px,
    #000 8px 10px
  );
  color: var(--bone);
  padding: 4px 8px;
  font-family: var(--display);
  font-size: 16px;
  display: flex; align-items: center;
  cursor: move;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--ink);
}
.window .titlebar .title { flex: 1; padding-left: 4px; }
.window .titlebar .btn {
  width: 18px; height: 18px;
  margin-left: 4px;
  background: var(--bone);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  text-align: center;
  line-height: 16px;
  cursor: pointer;
}
.window .titlebar .btn:hover { background: var(--neon-yellow); }
.window .titlebar .btn.close:hover { background: var(--neon-blood); color: var(--bone); }
.window .body {
  padding: 14px 18px;
  overflow: auto;
  min-height: 120px;
  flex: 1 1 auto;
  line-height: 1.6;
  position: relative;
  background-color: #3a2614;
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: 55% auto;
  color: #f4e9c1;
}
.window[data-bg="splat"]  .body { background-image: url("../assets/steadman-splat.svg"); }
.window[data-bg="bat"]    .body { background-image: url("../assets/steadman-bat.svg"); }
.window[data-bg="shark"]  .body { background-image: url("../assets/steadman-shark.svg"); }
.window[data-bg="lizard"] .body { background-image: url("../assets/steadman-lizard.svg"); }
.window .body > * { position: relative; z-index: 1; }

/* Article reader */
.article h1 {
  font-family: var(--psy);
  color: var(--neon-yellow);
  text-shadow: 2px 2px 0 var(--neon-blood);
  font-size: 28px;
  margin: 0 0 6px;
  letter-spacing: .02em;
}
.article h2, .article h3 {
  font-family: var(--display);
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.article hr {
  border: 0;
  height: 14px;
  background: url("assets/divider.svg") center / contain no-repeat;
  margin: 24px 0;
}
.article p { margin: 12px 0; }
.article .meta {
  font-family: var(--mono);
  color: var(--sand);
  border-left: 4px solid var(--neon-pink);
  padding: 6px 12px;
  margin: 0 0 18px;
  background: rgba(0,0,0,.4);
}
.article .meta span { color: var(--neon-yellow); }

/* Editor intervention */
.ed-strike {
  position: relative;
  text-decoration: line-through;
  text-decoration-color: #ff2a1f;
  text-decoration-thickness: 3px;
  cursor: help;
  color: rgba(244,233,193,.7);
}
.ed-strike::after {
  content: attr(data-note);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px) rotate(-2deg);
  background: #ffe21a;
  color: #1a0d04;
  padding: 6px 10px;
  border: 2px solid #1a0d04;
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  white-space: nowrap;
  max-width: 300px;
  white-space: normal;
  box-shadow: 3px 3px 0 rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 10;
}
.ed-strike:hover::after { opacity: 1; }

/* Footnote ambush */
.fn[data-fn] {
  cursor: help;
  border-bottom: 1px dotted rgba(255,226,26,.4);
  position: relative;
}
.fn[data-fn]:hover { color: var(--neon-yellow); text-shadow: 0 0 8px rgba(255,226,26,.6); }
.fn[data-fn]:hover::after {
  content: attr(data-fn);
  position: absolute;
  top: 100%; left: 0;
  background: var(--ink);
  color: var(--neon-cyan);
  padding: 8px 12px;
  border: 1px solid var(--neon-cyan);
  font-family: var(--mono);
  font-size: 13px;
  width: 280px;
  z-index: 10;
  white-space: normal;
}
.article .share {
  margin-top: 24px;
  padding: 12px;
  background: rgba(0,0,0,.5);
  border: 2px dashed var(--neon-cyan);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.article .share span { color: var(--neon-cyan); font-family: var(--display); font-size: 14px; }
.article .share input {
  flex: 1;
  min-width: 200px;
  background: #000;
  color: var(--neon-yellow);
  border: 1px solid var(--sand);
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
}

/* Posts list */
.postlist { list-style: none; padding: 0; margin: 0; }
.postlist li {
  border-bottom: 1px dashed var(--sand);
  padding: 10px 4px;
  cursor: pointer;
}
.postlist li:hover { background: rgba(255,43,143,.15); }
.postlist .ttl { color: var(--neon-yellow); font-family: var(--display); font-size: 18px; }
.postlist .ex { color: var(--bone); opacity: .85; font-size: 14px; }
.postlist .dt { color: var(--neon-cyan); font-size: 13px; }

/* Quiz */
.quiz .q { font-family: var(--display); color: var(--neon-yellow); font-size: 18px; margin-bottom: 12px; }
.quiz .opts { display: grid; gap: 8px; }
.quiz .opt {
  background: var(--asphalt);
  border: 2px solid var(--sand);
  color: var(--bone);
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 16px;
}
.quiz .opt:hover { background: var(--neon-purple); color: var(--bone); }
.quiz .opt.correct { background: var(--neon-acid); color: var(--ink); }
.quiz .opt.wrong { background: var(--neon-blood); color: var(--bone); }
.quiz .progress { color: var(--neon-cyan); font-size: 14px; margin-bottom: 8px; }

/* Suitcase inventory */
.inv {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.inv .item {
  background: var(--asphalt);
  border: 1px dashed var(--sand);
  padding: 10px;
  font-size: 13px;
  color: var(--bone);
}
.inv .item b { color: var(--neon-pink); display: block; font-family: var(--display); margin-bottom: 4px; }
.inv .warn {
  color: var(--neon-blood);
  text-align: center;
  font-family: var(--display);
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* Terminal */
.term { background: #000; color: var(--neon-acid); font-family: var(--mono); padding: 12px; min-height: 240px; }
.term .line { white-space: pre-wrap; }
.term .cursor { display: inline-block; background: var(--neon-acid); width: 8px; height: 16px; vertical-align: middle; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term input {
  background: transparent;
  color: var(--neon-acid);
  border: 0;
  font: inherit;
  outline: none;
  width: 80%;
}

/* Polymarket parody */
.poly .row {
  display: flex; justify-content: space-between;
  border-bottom: 1px solid var(--sand);
  padding: 6px 0;
}
.poly .yes { color: var(--neon-acid); }
.poly .no { color: var(--neon-blood); }

/* Mint 400 game */
.mint canvas { display: block; margin: 0 auto; border: 2px solid var(--neon-yellow); box-shadow: 0 0 24px rgba(255,42,31,.4); image-rendering: pixelated; }
.mint .hud { font-family: var(--mono); color: var(--neon-yellow); text-align: center; padding: 8px; letter-spacing: .12em; }
.mint .ctrl { color: var(--neon-cyan); text-align: center; font-size: 13px; padding: 6px 0 0; }

/* Graffiti wall */
.wall {
  position: relative;
  min-height: 320px;
  background: #1a0d04 url("../assets/steadman-splat.svg") center / cover;
  border: 2px dashed var(--sand);
  overflow: hidden;
  padding: 8px;
}
.wall .tag {
  position: absolute;
  font-family: var(--display);
  font-size: 18px;
  text-shadow: 2px 2px 0 #000;
  white-space: nowrap;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  user-select: none;
  transition: transform .15s;
}
.wall .tag:hover { transform: scale(1.1) rotate(-1deg); }
.wallform { display: flex; gap: 6px; margin: 12px 0 6px; }
.wallform input {
  flex: 1;
  background: #000;
  color: var(--neon-yellow);
  border: 2px solid var(--sand);
  padding: 8px;
  font: inherit;
}
.wallform button {
  background: var(--neon-pink);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--display);
  text-transform: uppercase;
}
.wallform button:hover { background: var(--neon-yellow); }

/* Slot machine */
.slot-reels { display: flex; justify-content: center; gap: 12px; margin: 18px 0; }
.slot-reels .reel {
  width: 80px; height: 80px;
  background: #000;
  border: 3px solid var(--neon-yellow);
  font-size: 48px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 20px rgba(255,226,26,.3);
}
.slot-msg { text-align: center; color: var(--neon-pink); font-family: var(--display); margin: 10px 0; font-size: 18px; }

/* Pills */
.pills { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; padding: 10px; background: #000; border: 2px dashed var(--sand); }
.pill {
  width: 100%; aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255,255,255,.3), inset -4px -4px 8px rgba(0,0,0,.4);
  transition: transform .15s;
}
.pill:hover { transform: scale(1.15) rotate(8deg); }

/* TV */
.tv-screen {
  background: #001100;
  color: #00ff66;
  font-family: var(--mono);
  padding: 18px;
  min-height: 160px;
  white-space: pre-wrap;
  border: 4px ridge #444;
  border-radius: 6px;
  box-shadow: inset 0 0 32px rgba(0,255,102,.3);
  font-size: 16px;
}
.tv-ctrl { display: flex; gap: 8px; margin-top: 10px; }
.tv-ctrl .opt { flex: 1; }

/* Tape */
.tape-screen {
  background: #000;
  color: var(--neon-acid);
  font-family: var(--mono);
  padding: 12px;
  min-height: 200px;
  max-height: 240px;
  overflow-y: auto;
  border: 2px solid var(--sand);
  white-space: pre-wrap;
  font-size: 14px;
}

/* Phone */
.phone-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.phone-pad .key {
  background: #2a1808;
  color: var(--neon-yellow);
  border: 2px solid var(--sand);
  padding: 14px;
  font-family: var(--display);
  font-size: 20px;
  cursor: pointer;
}
.phone-pad .key:hover { background: var(--neon-yellow); color: var(--ink); }

/* Toast quotes */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--neon-yellow);
  border: 2px solid var(--neon-pink);
  padding: 10px 18px;
  font-family: var(--display);
  letter-spacing: .04em;
  z-index: 1000;
  box-shadow: 0 0 24px rgba(255,43,143,.5);
  max-width: 70vw;
  text-align: center;
}
