@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Courier+Prime:wght@400;700&family=Black+Ops+One&family=Bangers&display=swap');

:root {
  --ink: #0a0a0a;
  --paper: #f2f0e9;
  --pink: #ff2d95;
  --cyan: #00e5ff;
  --yellow: #ffe600;
  --orange: #ff5e00;
  --lime: #b8ff00;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #111;
  color: #f5f5f0;
  font-family: 'Courier Prime', monospace;
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.45;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== NAV ===== */
.nav {
  position: relative;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  padding: 1rem 0.8rem 0.6rem;
  background: #000;
  border-bottom: 3px solid var(--pink);
}

.nav a {
  font-family: 'Special Elite', cursive;
  font-size: 0.78rem;
  color: #fff;
  text-decoration: none;
  padding: 0.25rem 0.55rem;
  border: 2px solid #444;
  background: #1a1a1a;
  transition: all 0.15s;
}

.nav a:hover, .nav a.active {
  background: var(--yellow);
  color: #000;
  border-color: #000;
  box-shadow: 2px 2px 0 var(--pink);
}

/* ===== PAGE SHELL ===== */
.page {
  position: relative;
  z-index: 5;
  max-width: 820px;
  margin: 0 auto;
  padding: 1.8rem 1.2rem 4rem;
}

.page-paper {
  background: var(--paper);
  color: #000;
  border: 3px solid #000;
  box-shadow: 8px 10px 0 #000;
  padding: 1.6rem 1.4rem 2rem;
  transform: rotate(-0.4deg);
  position: relative;
}

.page-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 26px, rgba(0,0,0,0.035) 26px, rgba(0,0,0,0.035) 27px);
  pointer-events: none;
}

.page h1 {
  font-family: 'Black Ops One', system-ui;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  line-height: 1;
  margin-bottom: 0.3rem;
  text-shadow: 3px 3px 0 var(--pink);
}

.page .subtitle {
  font-family: 'Special Elite', cursive;
  font-size: 0.95rem;
  color: #111;
  margin-bottom: 1.4rem;
  display: inline-block;
  background: var(--yellow);
  padding: 0.15rem 0.5rem;
  border: 2px solid #000;
}

.page h2 {
  font-family: 'Special Elite', cursive;
  font-size: 1.25rem;
  margin: 1.6rem 0 0.5rem;
  border-bottom: 2px dashed #000;
  padding-bottom: 0.2rem;
}

.page h3 {
  font-family: 'Special Elite', cursive;
  font-size: 1.05rem;
  margin: 1.2rem 0 0.35rem;
}

.page p, .page li {
  font-size: 0.92rem;
  margin-bottom: 0.7rem;
}

.page ul {
  margin: 0.4rem 0 1rem 1.3rem;
}

.stamp {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border: 2px dashed #000;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0.3rem 0.3rem 0.3rem 0;
}

.neon-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--pink), var(--cyan), var(--yellow));
  margin: 0.8rem 0 1.2rem;
}

.back-link {
  display: inline-block;
  margin-top: 1.8rem;
  font-family: 'Special Elite', cursive;
  font-size: 0.85rem;
  color: #000;
  background: var(--cyan);
  padding: 0.3rem 0.7rem;
  border: 2px solid #000;
  text-decoration: none;
  box-shadow: 3px 3px 0 #000;
}

.back-link:hover {
  background: var(--yellow);
}

.character-box {
  background: #111;
  color: #eee;
  border: 2px solid #000;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
  box-shadow: 4px 4px 0 var(--pink);
}

.character-box h3 {
  color: var(--yellow);
  margin-top: 0;
}

.note {
  font-size: 0.82rem;
  background: #fff8dc;
  border: 2px dashed #000;
  padding: 0.6rem 0.8rem;
  margin: 1rem 0;
}

@media (max-width: 600px) {
  .page { padding: 1rem 0.6rem 3rem; }
  .page-paper { padding: 1.2rem 1rem 1.6rem; }
}

/* ===== PAGE ANIMATIONS ===== */
.smoke-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 1.2rem;
}
.smoke-wrap img {
  position: relative;
  z-index: 2;
  width: 100%;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  display: block;
}
.smoke {
  position: absolute;
  inset: -20% -10% -10% -10%;
  z-index: 1;
  background: radial-gradient(ellipse at 30% 80%, rgba(180,180,180,0.25) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 60%, rgba(120,120,120,0.2) 0%, transparent 55%),
              radial-gradient(ellipse at 50% 90%, rgba(200,200,200,0.15) 0%, transparent 50%);
  filter: blur(18px);
  animation: drift 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes drift {
  0%   { transform: translateY(8px) scale(1); opacity: 0.7; }
  100% { transform: translateY(-18px) scale(1.08); opacity: 1; }
}

.tunnel-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 1.2rem;
}
.tunnel-wrap img {
  position: relative;
  z-index: 2;
  width: 100%;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  display: block;
}
.tunnel-lights {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, transparent 0%, rgba(0,229,255,0.15) 30%, transparent 50%, rgba(255,230,0,0.12) 70%, transparent 100%);
  animation: pulseLights 4.5s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}
@keyframes pulseLights {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.9; }
}

.img-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.4rem;
}
.img-stack img {
  width: 100%;
  max-width: 420px;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
}
