/* ── Streets of Rage Fan Page — Shared Stylesheet ─────────────── */
/* Urban neon theme: dark asphalt, electric blue, neon orange/pink  */

@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital,wght@0,400;0,700;1,400&family=Press+Start+2P&family=VT323:wght@400&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --bg:        #0f0a18;
  --bg-card:   #0d0d1e;
  --blue:      #00c8ff;
  --orange:    #ff3d00;
  --magenta:   #ff0077;
  --green:     #00ff88;
  --yellow:    #ffcc00;
  --text:      #d0d0f0;
  --text-dim:  #6868a0;
  --border:    #1a1a30;
  --font-head: 'Press Start 2P', monospace;
  --font-body: 'Bai Jamjuree', 'VT323', 'Courier Prime', 'Courier New', sans-serif;
  --font-ui:   'Bai Jamjuree', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.2rem;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.4;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--green); text-decoration: underline; }

img { max-width: 100%; height: auto; }

@media (pointer: fine) {
  body, a, button, [role="button"] { cursor: crosshair; }
}

/* ── Navigation ─────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 400;
  background-color: rgba(15, 10, 24, 0.97);
  border-bottom: 2px solid var(--orange);
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

nav a {
  font-family: var(--font-head);
  font-size: 0.45rem;
  color: var(--orange);
  letter-spacing: 0.05em;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--orange);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  display: inline-block;
}

nav a:hover,
nav a[aria-current="page"] {
  background: var(--orange);
  color: var(--bg);
  text-decoration: none;
}

/* ── Main layout ─────────────────────────────────────────────────── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Section title ───────────────────────────────────────────────── */
.section-title {
  font-family: var(--font-head);
  font-size: clamp(0.5rem, 2.5vw, 0.85rem);
  color: var(--blue);
  text-shadow: 0 0 10px var(--blue);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

/* ── Page header (non-index pages) ─────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, #0a0a20 0%, #1a0a0a 100%);
  border-bottom: 2px solid var(--orange);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.page-title {
  font-family: var(--font-head);
  font-size: clamp(0.7rem, 3vw, 1.2rem);
  color: var(--orange);
  text-shadow: 0 0 16px var(--orange);
  margin-bottom: 0.75rem;
}

.page-subtitle {
  font-family: var(--font-body);
  font-size: 1.3rem;
  color: var(--text-dim);
}

/* ── Pixel divider ───────────────────────────────────────────────── */
.pixel-divider {
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    var(--orange) 0px,
    var(--orange) 8px,
    transparent 8px,
    transparent 16px
  );
  margin: 1.5rem 0;
  opacity: 0.6;
}

/* ── Cards / glass ───────────────────────────────────────────────── */
.card-glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
}

/* ── Trivia widget ───────────────────────────────────────────────── */
.trivia-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}

.trivia-label {
  font-family: var(--font-head);
  font-size: 0.4rem;
  color: var(--green);
  text-shadow: 0 0 6px var(--green);
  margin-bottom: 1rem;
}

.trivia-text {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 1.2rem;
  min-height: 2.5rem;
}

.trivia-next {
  font-family: var(--font-head);
  font-size: 0.4rem;
  background: transparent;
  border: 1px solid var(--green);
  color: var(--green);
  padding: 0.5rem 1rem;
  transition: background 0.2s, color 0.2s;
}
.trivia-next:hover { background: var(--green); color: var(--bg); }

/* ── Blockquote ──────────────────────────────────────────────────── */
blockquote {
  border-left: 4px solid var(--magenta);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(255, 0, 119, 0.05);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text);
}

blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.95rem;
  color: var(--magenta);
  font-family: var(--font-head);
  font-size: 0.35rem;
}

/* ── Info callout ─────────────────────────────────────────────────── */
.callout {
  background: rgba(0, 200, 255, 0.05);
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-left: 4px solid var(--blue);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}

.callout.orange {
  background: rgba(255, 61, 0, 0.05);
  border-color: rgba(255, 61, 0, 0.25);
  border-left-color: var(--orange);
}

/* ── Figure / caption ─────────────────────────────────────────────── */
figure {
  margin: 0;
}

figcaption {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  line-height: 1.4;
}

/* ── Reading progress bar ─────────────────────────────────────────── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--orange);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s;
}

/* ── Back to top ─────────────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-head);
  font-size: 0.35rem;
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  cursor: crosshair;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 300;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Scroll reveal ────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── CRT mode ─────────────────────────────────────────────────────── */
.crt-mode body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  z-index: 9998;
}

/* ── Video grid (shared) ─────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  display: flex;
  flex-direction: column;
}

.video-card.orange { border-top-color: var(--orange); }
.video-card.magenta { border-top-color: var(--magenta); }
.video-card.green { border-top-color: var(--green); }
.video-card.yellow { border-top-color: var(--yellow); }

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  padding: 0.75rem 1rem 1rem;
  flex: 1;
}

.video-title {
  font-family: var(--font-head);
  font-size: 0.4rem;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.video-desc {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── Section heading (alternate style) ───────────────────────────── */
.section-heading {
  font-family: var(--font-head);
  font-size: clamp(0.45rem, 2vw, 0.7rem);
  color: var(--blue);
  text-shadow: 0 0 6px var(--blue);
  margin: 2.5rem 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.section-heading.orange { color: var(--orange); text-shadow: 0 0 6px var(--orange); }
.section-heading.magenta { color: var(--magenta); text-shadow: 0 0 6px var(--magenta); }
.section-heading.green { color: var(--green); text-shadow: 0 0 6px var(--green); }

/* ── Footer ──────────────────────────────────────────────────────── */
footer {
  background: var(--bg-card);
  border-top: 2px solid var(--border);
  margin-top: 4rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.footer-inner { max-width: 900px; margin: 0 auto; }

.footer-title {
  font-family: var(--font-head);
  font-size: 0.5rem;
  color: var(--orange);
  margin-bottom: 1rem;
}

.footer-disclaimer {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  font-family: var(--font-head);
  font-size: 0.35rem;
  color: var(--blue);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
}

.footer-links a:hover { border-color: var(--blue); text-decoration: none; }

.footer-copy {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .video-grid { grid-template-columns: 1fr; }
  nav { padding: 0.5rem; }
  main { padding: 1.5rem 1rem; }
  .page-header { padding: 2rem 1rem 1.5rem; }
}

@media (min-width: 1000px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}

/* ── Prefers reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ── @property for animatable neon glow colours ──────────────────── */
@property --glow-spread {
  syntax: '<length>';
  inherits: false;
  initial-value: 10px;
}

@property --glow-opacity {
  syntax: '<number>';
  inherits: false;
  initial-value: 0.6;
}

@keyframes neon-pulse {
  0%, 100% { --glow-spread: 8px;  --glow-opacity: 0.5; }
  50%       { --glow-spread: 22px; --glow-opacity: 1;   }
}

.neon-glow-pulse {
  animation: neon-pulse 2.4s ease-in-out infinite;
  text-shadow:
    0 0 var(--glow-spread) rgba(255, 61, 0, var(--glow-opacity)),
    0 0 calc(var(--glow-spread) * 2) rgba(255, 61, 0, calc(var(--glow-opacity) * 0.4));
}

/* ── aside.trivia — semantic trivia callouts ────────────────────── */
aside.trivia {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
}

.trivia-head {
  font-family: var(--font-head);
  font-size: 0.38rem;
  color: var(--green);
  text-shadow: 0 0 6px var(--green);
  margin-bottom: 0.6rem;
}

aside.trivia.orange   { border-left-color: var(--orange); }
aside.trivia.orange   .trivia-head { color: var(--orange);  text-shadow: 0 0 6px var(--orange); }
aside.trivia.blue     { border-left-color: var(--blue); }
aside.trivia.blue     .trivia-head { color: var(--blue);    text-shadow: 0 0 6px var(--blue); }
aside.trivia.magenta  { border-left-color: var(--magenta); }
aside.trivia.magenta  .trivia-head { color: var(--magenta); text-shadow: 0 0 6px var(--magenta); }

/* ── blockquote.dev-quote ──────────────────────────────────────── */
blockquote.dev-quote {
  border-left: 4px solid var(--magenta);
  padding: 1.25rem 1.75rem 1.25rem 2.5rem;
  margin: 2rem 0;
  background: rgba(255, 0, 119, 0.05);
  font-style: italic;
  font-size: 1.2rem;
  position: relative;
}

blockquote.dev-quote::before {
  content: '\201C';
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  font-size: 3rem;
  color: var(--magenta);
  opacity: 0.35;
  font-family: Georgia, serif;
  line-height: 1;
}

blockquote.dev-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-family: var(--font-head);
  font-size: 0.35rem;
  color: var(--magenta);
}

/* ── Diagonal clip-path section dividers ──────────────────────── */
.clip-divider {
  height: 48px;
  background: var(--bg-card);
  clip-path: polygon(0 0, 100% 0, 100% 30%, 0 100%);
  margin: 0;
  pointer-events: none;
}

.clip-divider.flip {
  clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 100%);
}

/* ── mix-blend-mode: screen for character art on neon background ── */
.neon-blend-wrap { isolation: isolate; }
.neon-blend      { mix-blend-mode: screen; }

/* ── CSS scroll-driven animations — characters slide from sides ─── */
@supports (animation-timeline: view()) {
  .slide-from-left,
  .slide-from-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .slide-from-left {
    animation: enter-from-left linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }

  .slide-from-right {
    animation: enter-from-right linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }

  @keyframes enter-from-left {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  @keyframes enter-from-right {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  @media (prefers-reduced-motion: reduce) {
    .slide-from-left,
    .slide-from-right { animation: none; opacity: 1; transform: none; }
  }
}

/* ── Flagship page: CSS Grid named template areas ─────────────── */
.flagship-grid {
  display: grid;
  grid-template-areas:
    "fheader  fheader"
    "fmain    faside"
    "ffooter  ffooter";
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto 1fr auto;
}

.flagship-grid-header { grid-area: fheader; }
.flagship-main-area   { grid-area: fmain;   max-width: none; padding: 2rem 2rem 2rem 1.5rem; }
.flagship-aside-area  {
  grid-area: faside;
  padding: 2rem 1.5rem;
  border-left: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}
.flagship-grid-footer { grid-area: ffooter; }

@media (max-width: 950px) {
  .flagship-grid {
    grid-template-areas:
      "fheader"
      "fmain"
      "faside"
      "ffooter";
    grid-template-columns: 1fr;
  }
  .flagship-main-area  { padding: 1.5rem; }
  .flagship-aside-area { border-left: none; border-top: 1px solid var(--border); }
}

/* Flagship aside: stat table */
.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.stat-table th,
.stat-table td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  line-height: 1.4;
}

.stat-table th {
  font-family: var(--font-head);
  font-size: 0.3rem;
  color: var(--orange);
  width: 45%;
}

.stat-table td { color: var(--text); }

/* Move list */
.move-list {
  list-style: none;
  font-size: 0.95rem;
}

.move-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.move-input {
  font-family: var(--font-head);
  font-size: 0.28rem;
  color: var(--blue);
  white-space: nowrap;
  background: rgba(0,200,255,0.08);
  border: 1px solid rgba(0,200,255,0.2);
  padding: 0.15rem 0.4rem;
  line-height: 1.6;
}

.move-name { color: var(--text); }

/* ── Gallery page ─────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: crosshair;
  transition: transform 0.2s, border-color 0.2s;
}

.gallery-item:hover {
  transform: translateY(-3px);
  border-color: var(--orange);
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: brightness(0.9);
  transition: filter 0.2s;
}

.gallery-item:hover img { filter: brightness(1.05); }

.gallery-caption {
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
}

.filter-btn {
  font-family: var(--font-head);
  font-size: 0.35rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.4rem 0.9rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--orange);
  color: var(--bg);
  border-color: var(--orange);
}

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-overlay.open { display: flex; }

.lightbox-inner {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  text-align: center;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  border: 2px solid var(--orange);
  box-shadow: 0 0 40px rgba(255,61,0,0.3);
  display: block;
  margin: 0 auto;
}

.lightbox-caption {
  color: var(--text);
  font-size: 1rem;
  margin-top: 0.75rem;
}

.lightbox-close {
  position: absolute;
  top: -2rem;
  right: 0;
  font-family: var(--font-head);
  font-size: 0.4rem;
  color: var(--orange);
  background: transparent;
  border: 1px solid var(--orange);
  padding: 0.3rem 0.6rem;
}

.gallery-item[data-hidden="true"] { display: none; }

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .gallery-item img { height: 130px; }
}
