/* ============================================================
   W O B — WE ONLY BUY
   aesthetic: 1998 geocities fan-shrine × stock terminal
   ============================================================ */

@font-face {
  font-family: 'Press Start 2P';
  src: url('../assets/fonts/press-start-2p.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'VT323';
  src: url('../assets/fonts/vt323.woff2') format('woff2');
  font-display: swap;
}

:root {
  --term: #00ff41;
  --term-dim: #00b32e;
  --lime: #ccff00;
  --money: #17c317;
  --dk: #003b00;
  --deep: #020a02;
  --panel: #041504;
  --yellow: #ffff00;
  --hot: #ff00cc;
  --g95: #c0c0c0;
  --g95-dk: #808080;
  --g95-lt: #dfdfdf;
  --pixel: 'Press Start 2P', monospace;
  --term-font: 'VT323', 'Courier New', monospace;
  --comic: 'Comic Sans MS', 'Comic Neue', 'Chalkboard SE', cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--deep);
  color: var(--term);
  font-family: var(--comic);
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><text x="2" y="18" font-size="17" fill="%2300ff41" stroke="%23003b00" stroke-width="1" font-family="monospace" font-weight="bold">$</text></svg>') 4 16, auto;
  overflow-x: hidden;
}

/* fixed atmosphere layer: scanlines + grid + vignette raster once,
   instead of re-rasterizing a 4000px document on every scroll */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(0, 255, 65, 0.13), transparent 60%),
    repeating-linear-gradient(0deg, rgba(0, 255, 65, 0.04) 0px, rgba(0, 255, 65, 0.04) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(0, 60, 0, 0.35) 0px, rgba(0, 60, 0, 0.35) 1px, transparent 1px, transparent 32px),
    repeating-linear-gradient(0deg, rgba(0, 60, 0, 0.35) 0px, rgba(0, 60, 0, 0.35) 1px, transparent 1px, transparent 32px);
}

/* ============ caution strip ============ */
.caution-strip {
  height: 14px;
  background: repeating-linear-gradient(-45deg, #000 0 14px, var(--yellow) 14px 28px);
  border-bottom: 2px solid #000;
}

/* ============ ticker ============ */
.ticker-wrap {
  overflow: hidden;
  background: #000;
  border-top: 1px solid var(--dk);
  border-bottom: 2px solid var(--term-dim);
  padding: 3px 0;
  white-space: nowrap;
}
.ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: tickerScroll 28s linear infinite;
  font-family: var(--term-font);
  font-size: 22px;
}
.tick { margin: 0 1.4em; letter-spacing: 1px; }
.tick.up { color: var(--term); text-shadow: 0 0 6px rgba(0,255,65,.7); }
.tick.down { color: #ff4444; text-shadow: 0 0 6px rgba(255,60,60,.7); }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ layout ============ */
.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 10px 60px;
}

section, .hero { margin: 26px 0; }

.panel-outset {
  border: 4px outset var(--term-dim);
  background:
    linear-gradient(rgba(0, 30, 0, 0.55), rgba(0, 16, 0, 0.7)),
    repeating-linear-gradient(45deg, rgba(0, 179, 46, 0.10) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(0, 179, 46, 0.10) 0 2px, transparent 2px 9px),
    #041504;
  padding: 18px 16px 22px;
  position: relative;
  box-shadow: 0 0 24px rgba(0, 255, 65, 0.12), inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.panel-ridge {
  border: 6px ridge var(--money);
  background: linear-gradient(rgba(0, 22, 0, 0.92), rgba(0, 10, 0, 0.96));
}

/* ============ hero ============ */
.hero { text-align: center; padding-top: 26px; padding-bottom: 10px; }

.corner-gif { position: absolute; width: 64px; z-index: 3; }
.corner-gif.tl { top: -18px; left: -14px; transform: rotate(-14deg); }
.corner-gif.tr { top: -18px; right: -14px; transform: rotate(12deg); }

.hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-side-gif { width: 110px; image-rendering: pixelated; }
.hero-side-gif.flip { transform: scaleX(-1); }

.wob-face {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 4px double var(--term);
  background: radial-gradient(circle, rgba(0, 80, 0, 0.9), rgba(0, 20, 0, 1));
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.45), 0 0 90px rgba(0, 255, 65, 0.15);
  cursor: pointer;
  transition: transform 0.12s;
  animation: floaty 4s ease-in-out infinite;
}
.wob-face:hover { transform: scale(1.05) rotate(-2deg); }
.wob-face.boing { animation: boing 0.45s; }
@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}
@keyframes boing {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.25, 0.75); }
  55% { transform: scale(0.8, 1.2); }
  75% { transform: scale(1.1, 0.9); }
  100% { transform: scale(1, 1); }
}

.wob-title {
  font-family: var(--pixel);
  font-size: clamp(54px, 12vw, 110px);
  margin: 12px 0 4px;
  line-height: 1;
  letter-spacing: 0.08em;
}
.wob-title span {
  display: inline-block;
  color: var(--term);
  text-shadow:
    3px 3px 0 var(--dk),
    6px 6px 0 #000,
    0 0 22px rgba(0, 255, 65, 0.9),
    0 0 60px rgba(0, 255, 65, 0.4);
  animation: titleBounce 1.6s ease-in-out infinite;
}
.wob-title span:nth-child(2) { animation-delay: 0.18s; color: var(--lime); }
.wob-title span:nth-child(3) { animation-delay: 0.36s; }
@keyframes titleBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  40% { transform: translateY(-10px) rotate(-3deg); }
  70% { transform: translateY(2px) rotate(2deg); }
}

.wob-sub {
  font-family: var(--comic);
  font-size: clamp(18px, 3.4vw, 26px);
  font-weight: bold;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #000;
  margin: 6px 0 14px;
}

.blink { animation: blinker 1.06s step-start infinite; }
@keyframes blinker { 50% { opacity: 0; } }

.welcome-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 6px 0 10px;
}
.welcome-gif { height: 44px; }

.visitor-line { font-size: 15px; color: #b8ffc8; margin: 10px 0 2px; }
.visitor-line em { color: var(--lime); }
.hero-links { display: flex; justify-content: center; gap: 10px; margin: 14px 0 4px; flex-wrap: wrap; }
.hero-btn { font-size: 13px; padding: 6px 14px; text-decoration: none; }

.counter {
  font-family: var(--term-font);
  font-size: 22px;
  background: #000;
  color: var(--term);
  border: 2px inset var(--g95-dk);
  padding: 1px 7px;
  letter-spacing: 4px;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.8);
}

/* ============ dividers & strips ============ */
.flame-divider {
  display: block;
  width: 100%;
  height: 26px;
  object-fit: cover;
  image-rendering: pixelated;
  margin: 10px 0;
}

.note-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.55);
  border: 2px dashed var(--term-dim);
  padding: 10px 14px;
}
.uc-gif { height: 32px; }
.webmaster-note {
  font-family: 'Times New Roman', serif;
  font-style: italic;
  font-size: 17px;
  color: #d4ffd4;
  max-width: 520px;
  margin: 0;
}
.webmaster-note b { color: var(--yellow); }

/* ============ section headers ============ */
.section-title {
  font-family: var(--pixel);
  font-size: clamp(15px, 3vw, 24px);
  text-align: center;
  color: var(--lime);
  text-shadow: 2px 2px 0 #000, 0 0 18px rgba(204, 255, 0, 0.5);
  margin: 4px 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.h-gif { height: 34px; }
.section-tag {
  text-align: center;
  font-size: 14px;
  color: #9fdca8;
  margin: 4px 0 16px;
}

/* ============ terminal / chart ============ */
.terminal {
  background: #000;
  border: 3px inset var(--g95-dk);
  padding: 8px;
  max-width: 790px;
  margin: 0 auto;
}
.terminal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--term-font);
  border-bottom: 1px solid var(--dk);
  padding: 2px 4px 6px;
}
.term-title { color: var(--term-dim); font-size: 18px; letter-spacing: 2px; }
.term-price { color: var(--term); font-size: 26px; text-shadow: 0 0 10px rgba(0,255,65,.8); }
.term-arrow { color: var(--lime); animation: arrowPulse 0.9s ease-in-out infinite; display: inline-block; }
@keyframes arrowPulse { 50% { transform: translateY(-4px); opacity: 0.6; } }

#chartCanvas { width: 100%; height: auto; display: block; }

.term-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  flex-wrap: wrap;
}
.term-note { font-family: var(--term-font); color: var(--term-dim); font-size: 16px; margin-left: 8px; }

/* ============ win95 widgets ============ */
.btn-95 {
  font-family: var(--pixel);
  font-size: 11px;
  color: #000;
  background: var(--g95);
  border: 3px outset var(--g95-lt);
  padding: 7px 12px;
  cursor: pointer;
}
.btn-95:active { border-style: inset; }
.btn-95.active { border-style: inset; background: #a8d0a8; }

.input-95 {
  font-family: var(--comic);
  font-size: 14px;
  background: #000;
  color: var(--term);
  border: 3px inset var(--g95-dk);
  padding: 7px 9px;
}
.input-95::placeholder { color: var(--term-dim); }

/* ============ buy console ============ */
.console-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.buy-side { text-align: center; }

.mega-buy {
  font-family: var(--pixel);
  font-size: 44px;
  padding: 26px 60px;
  color: #001a00;
  background: linear-gradient(#7dff7d, #17c317 45%, #0a8f0a);
  border: 7px outset #4bd44b;
  cursor: pointer;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.5), 0 8px 0 #043b04;
  animation: buyPulse 1.4s ease-in-out infinite;
}
.mega-buy:hover { filter: brightness(1.15); }
.mega-buy:active {
  border-style: inset;
  transform: translateY(6px) !important;
  box-shadow: 0 0 40px rgba(0, 255, 65, 0.8), 0 2px 0 #043b04;
}
@keyframes buyPulse {
  50% { transform: scale(1.035); }
}
.buy-stat { font-size: 16px; color: #b8ffc8; }
.buy-stat b { color: var(--lime); font-size: 20px; }

.sell-side {
  position: relative;
  width: 260px;
  min-height: 160px;
  border: 2px dashed rgba(255, 68, 68, 0.5);
  overflow: hidden;
}
.mega-sell {
  position: absolute;
  left: 70px;
  top: 50px;
  font-family: var(--pixel);
  font-size: 16px;
  padding: 12px 22px;
  color: #fff;
  background: linear-gradient(#ff8080, #cc2222);
  border: 5px outset #e06666;
  cursor: not-allowed;
  transition: left 0.15s ease-out, top 0.15s ease-out;
}
.sell-taunt {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font-family: var(--comic);
  font-size: 13px;
  color: #ff9c9c;
  text-shadow: 1px 1px 0 #000;
}
.fine-print {
  text-align: center;
  font-size: 12px;
  color: #6faf78;
  margin-top: 14px;
}

/* ============ 3d shrine ============ */
.section-shrine { text-align: center; }
.shrine-grid {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
}
.shrine-panel {
  width: min(400px, 96vw);
  margin: 0;
  padding: 0 0 12px;
  position: relative;
}
.viewer-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(#0d3d0d, #062406);
  border-bottom: 2px solid var(--term-dim);
  padding: 6px 10px;
}
.viewer-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--term);
  box-shadow: 0 0 6px var(--term);
}
.viewer-dot:nth-child(2) { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.viewer-dot:nth-child(3) { background: var(--hot); box-shadow: 0 0 6px var(--hot); }
.viewer-title {
  font-family: var(--term-font);
  font-size: 17px;
  color: var(--term);
  letter-spacing: 2px;
}
.viewer {
  position: relative;
  height: 340px;
  background:
    radial-gradient(circle at 50% 62%, rgba(0, 255, 65, 0.14), transparent 55%),
    linear-gradient(#010801, #000);
  overflow: hidden;
  touch-action: pan-y;
}
.viewer canvas { display: block; }
.viewer-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--term-font);
  font-size: 20px;
  color: var(--term);
  background: rgba(0, 4, 0, 0.85);
  z-index: 2;
  text-align: center;
}
.viewer-loading img { height: 30px; }
.viewer-loading p { margin: 4px; }
.load-pct { color: var(--lime); font-size: 26px; }
.load-joke { font-size: 15px; color: var(--term-dim); }
.shrine-caption {
  font-size: 14px;
  color: #c9ffd2;
  padding: 10px 16px 2px;
}
.shrine-caption b { color: var(--lime); }
.viewer-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 10px;
  flex-wrap: wrap;
}

/* ============ wobonomics ============ */
.nomics-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.nomics-table {
  border-collapse: collapse;
  font-size: 15px;
  background: rgba(0, 0, 0, 0.6);
  border: 3px ridge var(--money);
}
.nomics-table th {
  font-family: var(--pixel);
  font-size: 11px;
  background: var(--dk);
  color: var(--lime);
  padding: 9px 14px;
  border: 1px solid var(--term-dim);
}
.nomics-table td {
  padding: 8px 14px;
  border: 1px solid rgba(0, 179, 46, 0.5);
  color: #d4ffd4;
}
.nomics-table td:first-child { color: var(--term-dim); font-weight: bold; }
.val-up { color: var(--lime) !important; font-weight: bold; }

.pie-box { text-align: center; }
.pie {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto;
  background: conic-gradient(var(--money) 0 100%);
  border: 4px solid #000;
  box-shadow: 0 0 25px rgba(0, 255, 65, 0.4), inset -8px -10px 0 rgba(0,0,0,.25);
  animation: pieWobble 3s ease-in-out infinite;
}
@keyframes pieWobble { 50% { transform: rotate(8deg) scale(1.03); } }
.pie-label { font-size: 14px; color: #b8ffc8; margin: 10px 0; }
.pie-label b { color: var(--lime); font-size: 18px; }

/* ============ gallery ============ */
.section-gallery { text-align: center; }
.gallery-row {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.polaroid {
  background: #e9e4d0;
  padding: 10px 10px 8px;
  margin: 10px 0 0;
  box-shadow: 5px 7px 0 rgba(0, 0, 0, 0.55), 0 0 22px rgba(0, 255, 65, 0.12);
  position: relative;
  transition: transform 0.18s;
}
.polaroid::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 84px;
  height: 22px;
  background: rgba(200, 255, 160, 0.5);
  border: 1px dashed rgba(0, 80, 0, 0.35);
}
.polaroid img {
  width: 218px;
  height: 218px;
  object-fit: cover;
  display: block;
  image-rendering: auto;
  background: radial-gradient(circle at 50% 40%, #0e4d16, #041504 75%);
}
.polaroid figcaption {
  font-family: var(--comic);
  color: #163216;
  font-size: 13px;
  padding-top: 7px;
}
.tilt-l { transform: rotate(-3deg); }
.tilt-r { transform: rotate(2.4deg); }
.tilt-l2 { transform: rotate(-1.6deg); }
.polaroid:hover { transform: rotate(0deg) scale(1.05); z-index: 2; }

.gif-shelf {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px dotted var(--term-dim);
}
.gif-shelf img { max-height: 64px; image-rendering: pixelated; }

/* ============ guestbook ============ */
.gb-badge { height: 40px; }
.book-entries {
  max-width: 640px;
  margin: 0 auto 14px;
  text-align: left;
}
.book-entry {
  background: rgba(0, 0, 0, 0.65);
  border-left: 5px solid var(--money);
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 14px;
  color: #d4ffd4;
}
.book-entry .who {
  font-family: var(--term-font);
  font-size: 18px;
  color: var(--lime);
  letter-spacing: 1px;
}
.book-entry .when { color: var(--term-dim); font-size: 12px; float: right; }
.book-form {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
#bookMsg { width: min(320px, 80vw); }

/* ============ footer ============ */
.site-footer { text-align: center; margin-top: 40px; }
.webring {
  display: inline-block;
  padding: 14px 30px;
  margin-bottom: 20px;
}
.ring-title {
  font-family: var(--term-font);
  font-size: 26px;
  letter-spacing: 3px;
  color: var(--term);
  margin: 2px 0;
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.7);
}
.ring-sub { font-size: 13px; color: #9fdca8; margin: 2px 0 12px; }
.ring-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.badge-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.badge-row img { image-rendering: pixelated; }
.text-badge {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 8px;
  line-height: 1.6;
  color: var(--term);
  background: #000;
  border: 2px outset var(--g95-dk);
  padding: 6px 9px;
  text-decoration: none;
}
.mail-badge:hover { background: var(--dk); }

.copyright { font-size: 13px; color: #7fbf88; margin-top: 18px; }
.copyright .tiny { font-size: 11px; color: #4e7f56; }

/* ============ win95 popup ============ */
.win95 {
  position: fixed;
  z-index: 90;
  top: 22vh;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  background: var(--g95);
  border: 3px outset var(--g95-lt);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.6);
  color: #000;
}
.win95-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #063b06, #17c317);
  color: #fff;
  font-family: var(--pixel);
  font-size: 10px;
  padding: 5px 6px;
  cursor: grab;
  user-select: none;
  touch-action: none; /* so the title bar drags instead of scrolling on touch */
}
.win95-x {
  font-family: var(--comic);
  background: var(--g95);
  border: 2px outset var(--g95-lt);
  width: 22px;
  height: 20px;
  line-height: 12px;
  font-size: 11px;
  cursor: pointer;
  color: #000;
}
.win95-x:active { border-style: inset; }
.win95-body {
  padding: 14px 12px;
  text-align: center;
  font-family: var(--comic);
  font-size: 14px;
}
.pop-congrats {
  color: #0a8f0a;
  font-weight: bold;
  font-size: 17px;
  margin: 2px 0 8px;
}

/* ============ fx layer (arrows, trail, confetti) ============ */
#fxLayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  overflow: hidden;
}
.fx-arrow {
  position: absolute;
  font-family: var(--term-font);
  font-weight: bold;
  color: var(--term);
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.9);
  animation: flyUp 1.5s ease-out forwards;
}
@keyframes flyUp {
  from { transform: translateY(0) rotate(var(--rot, 0deg)); opacity: 1; }
  to { transform: translateY(-46vh) rotate(var(--rot, 0deg)); opacity: 0; }
}
.fx-trail {
  position: absolute;
  font-family: var(--term-font);
  font-size: 18px;
  color: var(--term);
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.8);
  animation: trailFade 0.9s ease-out forwards;
}
@keyframes trailFade {
  from { opacity: 0.95; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(14px) scale(0.5); }
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .ticker-track, .wob-title span, .wob-face, .blink, .mega-buy, .pie, .term-arrow { animation: none !important; }
  .fx-arrow, .fx-trail { display: none; }
  html { scroll-behavior: auto; }
}

/* ============ small screens ============ */
@media (max-width: 640px) {
  .hero-side-gif { width: 76px; }
  .wob-face { width: 140px; height: 140px; }
  .mega-buy { font-size: 30px; padding: 20px 40px; }
  .viewer { height: 280px; }
  .polaroid img { width: 170px; height: 170px; }
}
