/* ============================================================================
   grandtheftautosix.com — Retro MS-Paint / Early-Web Parody Stylesheet (v0.1)
   Zero external fonts, zero CDNs, Reels-first 390x844 above-the-fold layout.
   ============================================================================ */

:root {
  --bg-page: #fef7d8;
  --bg-grid: #f2e5b2;
  --ink: #111111;
  --surface: #ffffff;
  --pink: #ff2a9d;
  --pink-dark: #c90f74;
  --cyan: #00f0ff;
  --cyan-dark: #00a8b8;
  --yellow: #fff04d;
  --red: #ff2e2e;
  --lcd-bg: #0c1114;
  --lcd-border: #2a343b;
  --border-w: 3px;
  --shadow: 4px 4px 0 #111111;
  --font-sans: "Trebuchet MS", "Arial Black", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Courier New", Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg-page);
  background-image:
    linear-gradient(to right, rgba(17, 17, 17, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 17, 17, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  overflow-x: clip;
  line-height: 1.3;
}

/* --- 1. PERMANENT STICKY LEGAL BANNER (Guardrail #2) --- */
.legal-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--yellow);
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
  padding: 5px 8px;
  text-align: center;
  box-shadow: 0 2px 0 var(--ink);
}

.legal-banner__text {
  margin: 0 auto;
  max-width: 960px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

/* --- PAGE SHELL --- */
.page-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 10px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --- 2. COMPACT HERO HEADER --- */
.hero-box {
  background: linear-gradient(90deg, var(--pink) 0%, #ff6b35 55%, var(--cyan) 100%);
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--shadow);
  padding: 7px 10px;
}

.hero-box__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-title {
  margin: 0;
  font-size: clamp(19px, 5.2vw, 30px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 2px 2px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink);
  word-break: break-word;
}

.version-pill {
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  box-shadow: 2px 2px 0 var(--ink);
  flex-shrink: 0;
}

.hero-subtitle {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  display: inline-block;
  padding: 1px 6px;
  border: 2px solid var(--ink);
}

/* --- 3. COMPACT 2-COLUMN RETRO LCD TICKERS --- */
.ticker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.lcd-card {
  min-width: 0;
  background: var(--lcd-bg);
  color: #ffffff;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--shadow);
  padding: 6px 7px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.lcd-card--pink {
  border-top: 5px solid var(--pink);
}

.lcd-card--cyan {
  border-top: 5px solid var(--cyan);
}

.lcd-card__label {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  color: #d8e4ea;
  line-height: 1.2;
}

.lcd-readout {
  font-family: var(--font-mono);
  font-size: clamp(9px, 2.35vw, 15px);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: #040709;
  border: 2px solid var(--lcd-border);
  padding: 4px 2px;
  text-align: center;
  white-space: nowrap;
}

.lcd-readout--cyan {
  color: #46ffea;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.5);
}

.lcd-readout--yellow {
  color: var(--yellow);
  text-shadow: 0 0 6px rgba(255, 240, 77, 0.45);
}

/* --- RETRO CARDS & BUTTONS --- */
.retro-card {
  background: var(--surface);
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--shadow);
  padding: 8px;
}

.retro-btn {
  appearance: none;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
  background: #f2f2f2;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 8px 12px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 60ms ease, box-shadow 60ms ease;
}

.retro-btn:hover {
  filter: brightness(1.04);
}

.retro-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.retro-btn--sm {
  font-size: 11px;
  padding: 4px 8px;
  border-width: 2px;
  box-shadow: 2px 2px 0 var(--ink);
}

.retro-btn--primary {
  background: #48ff78;
  font-size: 14px;
  padding: 10px 16px;
}

.retro-btn--pink {
  background: var(--pink);
  color: #ffffff;
}

.retro-btn--cyan {
  background: var(--cyan);
  color: var(--ink);
}

.retro-btn--yellow {
  background: var(--yellow);
  color: var(--ink);
}

.retro-btn--full {
  width: 100%;
}

/* --- 4. PLAYABLE MINI-GAME CARD --- */
.game-card {
  background: #fff9fa;
  border-color: var(--ink);
  padding: 7px;
}

.game-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 6px;
}

.game-head__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.hud-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.hud-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  background: #111111;
  color: #ffffff;
  border: 2px solid var(--ink);
  padding: 3px 7px;
  font-family: var(--font-mono);
}

.hud-pill__k {
  font-size: 10px;
  color: #b7c7d1;
  text-transform: uppercase;
}

.hud-pill__v {
  font-size: 13px;
  color: #46ffea;
}

.canvas-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #1e0b2b;
  border: 3px solid var(--ink);
  overflow: hidden;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  background: #1e0b2b;
  image-rendering: pixelated;
  transition: filter 320ms ease;
}

.canvas-stage.is-spoiled #gameCanvas {
  filter: grayscale(100%) contrast(1.28) brightness(0.76);
}

/* OVERLAYS */
.stage-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(14, 7, 22, 0.56);
}

.stage-overlay[hidden] {
  display: none;
}

.overlay-box {
  background: var(--surface);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 12px 14px;
  text-align: center;
  max-width: 92%;
}

.overlay-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 900;
  color: var(--pink-dark);
}

.overlay-headline {
  margin: 2px 0 4px;
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}

.overlay-hint {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #333333;
}

/* SPOILED PARODY OVERLAY */
.stage-overlay--spoiled {
  background: rgba(10, 10, 10, 0.62);
}

.spoiled-panel {
  width: 100%;
  max-width: 318px;
  background: rgba(17, 17, 17, 0.94);
  color: #ffffff;
  border: 3px solid #ffffff;
  box-shadow: 5px 5px 0 #000000;
  padding: 12px 10px;
  text-align: center;
}

.spoiled-stamp {
  font-family: Impact, "Arial Black", var(--font-sans);
  font-size: clamp(32px, 9vw, 44px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--red);
  text-shadow: 3px 3px 0 #000000;
  line-height: 1;
  margin-bottom: 6px;
}

.spoiled-roast {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #f4f4f4;
}

.spoiled-score {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  color: var(--yellow);
}

.spoiled-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* TOUCH CONTROLS */
.touch-controls {
  width: 100%;
  max-width: 480px;
  margin: 7px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.touch-btn {
  appearance: none;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
  background: var(--cyan);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 12px 8px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.touch-btn:active,
.touch-btn.is-pressed {
  background: var(--yellow);
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

/* --- 5. COPIUM GENERATOR --- */
.copium-card {
  background: #f4fffe;
  padding: 10px;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.section-bar__title {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.mini-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  background: var(--ink);
  color: var(--yellow);
  padding: 2px 6px;
}

.copium-quote {
  margin: 0 0 10px;
  padding: 10px;
  background: #ffffff;
  border: 2px dashed var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  min-height: 54px;
  display: flex;
  align-items: center;
}

/* --- 6. ROCKSTAR CLAIM CARD --- */
.claim-card {
  background: #fff4b8;
  padding: 10px;
}

.claim-card__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.claim-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.claim-card__sub {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

/* --- 7. DAILY CHANGELOG --- */
.changelog-card {
  background: #ffffff;
  padding: 10px;
}

.changelog-list {
  margin: 0 0 8px;
  padding-left: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.changelog-item--reserved {
  color: var(--pink-dark);
  font-weight: 900;
}

.changelog-cta {
  margin: 0;
  padding: 7px 8px;
  background: #f8f0ff;
  border: 2px solid var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.handle-pill {
  background: var(--yellow);
  padding: 1px 5px;
  border: 1.5px solid var(--ink);
  font-family: var(--font-mono);
}

.daily-feature-mount:empty {
  display: none;
}

.parody-footer {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #333333;
  padding-top: 4px;
}

.parody-footer p {
  margin: 0;
}

/* --- MODAL --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-box {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 4px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
}

.modal-head {
  background: var(--yellow);
  border-bottom: 3px solid var(--ink);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-head__title {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  font-family: var(--font-mono);
}

.modal-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-copy {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
}

.email-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  background: #f2f2f2;
  border: 2px solid var(--ink);
  padding: 8px;
}

.email-box__addr {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  word-break: break-all;
}

.modal-social {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #333333;
}

/* --- DESKTOP COMFORT REFINEMENTS --- */
@media (min-width: 640px) {
  .legal-banner__text {
    font-size: 11.5px;
  }

  .page-shell {
    padding: 12px 16px 36px;
    gap: 12px;
  }

  .game-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  #gameCanvas {
    max-height: 360px;
  }
}
