:root {
  --bg: #0b0011;
  --fg: #eaffff;
  --acid: #00ffcc;
  --hot: #ff3bf0;
  --warn: #ffee00;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { overflow-x: hidden; overscroll-behavior-x: none; }
html { font-size: clamp(12px, 1.2vw, 16px); }
body {
  margin: 0;
  font-family: 'Space Mono', monospace;
  color: var(--fg);
  background: radial-gradient(1400px 600px at 15% 10%, #12001f, transparent),
              radial-gradient(800px 800px at 80% 20%, #0e0022, transparent),
              var(--bg);
  overflow-x: hidden; /* lock horizontal scroll */
  touch-action: pan-y; /* restrict gestures to vertical */
}

/* Canvas backdrop */
#neuron-sky { position: fixed; inset: 0; z-index: -1; }

.hero { position: relative; padding: clamp(8px, 2vw, 20px); display:flex; flex-direction:column; gap:10px; align-items:center; text-align:center; }
.logo-wrap { display:flex; flex-direction:column; align-items:center; gap:6px; }
.tag { margin:0; opacity:.9; letter-spacing:1.2px; font-size: clamp(0.9rem, 1.1vw, 1.2rem); }

.glitch {
  font-family: 'Monoton', cursive;
  font-size: clamp(34px, 7vw, 92px);
  line-height: 0.85;
  color: var(--fg);
  position: relative;
  text-shadow: 1px 0 var(--acid), -2px 0 var(--hot), 0 2px var(--warn);
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
}
.glitch::before { transform: translate(2px, 0); color: var(--acid); clip-path: polygon(0 0, 100% 0, 100% 45%, 0 55%); }
.glitch::after { transform: translate(-2px, 0); color: var(--hot); clip-path: polygon(0 60%, 100% 50%, 100% 100%, 0 100%); }

.hero-img { overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 2px #18ffc933, 0 10px 30px #00ffd51a; transform: perspective(600px) rotateX(1.2deg) scale(.92); max-width: 1100px; }
.hero-img img { display:block; width:100%; height:auto; filter: saturate(180%) contrast(120%); }

.marquee { overflow: hidden; white-space: nowrap; border-top: 1px dashed #33ffe0; border-bottom:1px dashed #33ffe0; }
.marquee-track { display: inline-block; padding: 10px 0; animation: move 25s linear infinite; color: var(--acid); }
@keyframes move { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Story panels */
.story { padding: clamp(6px, 1.6vw, 16px); display: grid; gap: 22px; }
.panel { position: relative; border-radius: 12px; overflow: hidden; border: 1.5px solid #00ffd564; box-shadow: 0 16px 36px #0008; isolation: isolate; transform: skewY(-0.2deg); filter: url(#schizo-warp); }
.panel .bg { width: 100%; height: auto; display:block; filter: saturate(160%) contrast(115%); transition: transform .6s ease, filter .6s ease; }
.panel .caption { position: absolute; inset: auto 0 0 0; padding: clamp(8px, 2.2vw, 16px); background: linear-gradient(180deg, #0000, #000a 40%, #000e); }
.panel .stamp { display:inline-block; background: #110033; color: var(--acid); padding: 4px 8px; border: 1.5px solid var(--acid); border-radius: 999px; font-weight: 700; margin-bottom: 4px; letter-spacing: .5px; font-size:.9rem; }
.meme-text { font-family: 'Press Start 2P', system-ui; text-transform: lowercase; margin: 2px 0 6px; font-size: clamp(12px, 2.8vw, 20px); color: var(--warn); text-shadow: 0 3px 0 #000; animation: pulse 2.2s infinite alternate ease-in-out; }
.narrative { margin: 0; max-width: 80ch; line-height: 1.5; font-size: .95rem; }

.panel.alt .caption { inset: 0 auto auto 0; background: linear-gradient(0deg, #0000, #000a 40%, #000e); }

.grid-memes { display:grid; grid-template-columns: repeat( auto-fit, minmax(200px, 1fr)); gap: 12px; }
.grid-memes figure { margin:0; border:1.5px dashed #33ffe0; border-radius: 12px; padding: 6px; background:#0a0016; }
.grid-memes img { width:100%; height:auto; display:block; border-radius: 8px; }
.grid-memes figcaption { font-size: 12px; opacity: .9; margin-top: 6px; }

/* Footer */
.foot { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:14px 16px; border-top: 1px dashed #33ffe044; background: linear-gradient(0deg, #0008, #0000); }
.foot img { width:40px; height:40px; border-radius: 50%; border:2px solid var(--hot); }
.small { font-size: 12px; opacity:.9; }

/* Responsive chaos rules */
@media (min-width: 900px) { .story { gap: 28px; grid-template-columns: repeat(2, 1fr); } }

/* Extra safety on small screens to avoid accidental overflow */
@media (max-width: 768px) {
  .hero, .story, .cta-bar, .foot { max-width: 100vw; overflow-x: hidden; }
}

/* Schizo mode intensifiers */
body.schizo { animation: hue 6s linear infinite; }
body.schizo .glitch::before { transform: translate(4px, -1px); }
body.schizo .glitch::after { transform: translate(-4px, 1px); }
@keyframes hue { to { filter: hue-rotate(360deg); } }

/* HUD */
.hud { position: fixed; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 20; }
.hud-btn { background:#140030cc; color:var(--fg); border:2px solid var(--acid); border-radius: 10px; padding: 10px 12px; cursor: pointer; box-shadow: 0 0 0 3px #00ffc933; font-weight:700; }
.hud-btn:hover { filter: brightness(1.2); }

/* CRT/scanline + glitch keyframes */
body::after { content:''; pointer-events:none; position:fixed; inset:0; background: repeating-linear-gradient( to bottom, #ffffff08 0px, #ffffff08 1px, transparent 1px, transparent 3px); mix-blend-mode: overlay; opacity:.3; z-index:1; }
@keyframes pulse { from { transform: translateY(0) scale(1); } to { transform: translateY(-2px) scale(1.02); } }

/* RGB split + VHS overlays */
.panel.revealed .bg { filter: saturate(190%) contrast(120%) drop-shadow(1px 0 0 rgba(255,0,0,.5)) drop-shadow(-1px 0 0 rgba(0,255,255,.5)); transform: scale(0.98); }
.panel:hover .bg { filter: brightness(1.05) drop-shadow(2px 0 0 rgba(255,0,0,.6)) drop-shadow(-2px 0 0 rgba(0,255,255,.6)); transform: scale(1.02); }
.panel.vhs::after { content:''; position:absolute; inset:0; background: repeating-linear-gradient(#fff1 0 2px, transparent 2px 4px); mix-blend-mode: overlay; opacity:.2; animation: vhs .8s steps(2) infinite; pointer-events:none; }
@keyframes vhs { 0% { transform: translateY(0); } 50% { transform: translateY(-1px); } 100% { transform: translateY(0); } }
.panel.glitch .bg { transform: translate(var(--gx,0px), var(--gy,0px)) scale(1.01); filter: hue-rotate(var(--gh,0deg)) saturate(180%) contrast(120%) drop-shadow(2px 0 0 rgba(255,0,0,.7)) drop-shadow(-2px 0 0 rgba(0,255,255,.7)); }

/* CTA bar */
.cta-bar { position: sticky; top: 0; z-index: 12; display:flex; gap:10px; flex-wrap:wrap; justify-content:center; padding: 8px; background: linear-gradient(180deg, #000c, #0006); backdrop-filter: blur(8px); border-bottom:1px dashed #00ffd580; }
.cta-btn { display:flex; align-items:center; gap:8px; color:var(--fg); background:#0c0020; border:2px solid var(--acid); border-radius: 999px; padding: 8px 12px; font-weight:800; cursor:pointer; text-decoration:none; }
.cta-btn.twitter { color:#00acee; border-color:#00acee; }
.cta-btn.twitter svg { width:18px; height:18px; }
.cta-btn.contract { color:#ffee00; border-color:#ffee00; }
.cta-btn.contract strong { background:#ffee00; color:#0b0011; padding:4px 8px; border-radius:999px; margin-left:6px; }
.cta-btn.sound { border-color:#ff3bf0; color:#ffb3f8; }

/* Contract truncation for visibility */
#contract-address { max-width: 48ch; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; display:inline-block; vertical-align: middle; }



