@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@400;600;700;800&display=swap');

:root {
  --bg: #090c13;
  --panel: #111722;
  --panel-hover: #172030;
  --ink: #f3f0e8;
  --muted: #9ba2b0;
  --red: #f13c47;
  --red-glow: rgba(241, 60, 71, 0.45);
  --line: #222938;
  --line-light: rgba(255, 255, 255, 0.1);
  --accent: #eeb969;
  --silver-grad: linear-gradient(135deg, #ffffff 0%, #cbd5e1 45%, #94a3b8 70%, #f8fafc 100%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.65 'DM Sans', Arial, sans-serif;
  overflow-x: clip;
}

button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button {
  cursor: pointer;
  color: inherit;
  background: none;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 4px;
  transition: all 0.25s ease;
}
button:hover {
  border-color: var(--red);
  background: rgba(241, 60, 71, 0.1);
}
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid #ffcf81; outline-offset: 4px; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 {
  line-height: .96;
  font-family: 'Barlow Condensed', Impact, sans-serif;
  text-transform: uppercase;
  font-weight: 700;
}
h2 { font-size: clamp(42px, 5vw, 72px); letter-spacing: -1px; }
h3 { font-size: 34px; }
p { color: var(--muted); }

.eyebrow, .tiny {
  font-size: 10px;
  letter-spacing: 2.8px;
  font-weight: 700;
  text-transform: uppercase;
}
.eyebrow { color: var(--red); margin-bottom: 23px; }
.tiny { color: #e0dfdf; margin-bottom: 18px; }
.dim { color: #707784; }

.skip {
  position: fixed;
  top: -100px;
  z-index: 999;
  background: var(--red);
  padding: 12px;
}
.skip:focus { top: 0; }

/* Header & Silver Spider Brand */
header {
  height: 90px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  background: linear-gradient(180deg, rgba(8, 11, 17, 0.92) 0%, rgba(8, 11, 17, 0.4) 70%, transparent 100%);
  backdrop-filter: blur(8px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  letter-spacing: .5px;
}
.brand img {
  width: 34px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.25)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.85));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand:hover img {
  transform: scale(1.08);
}
.brand span {
  display: flex;
  flex-direction: column;
}
.brand small {
  display: block;
  font: 8px 'DM Sans', sans-serif;
  letter-spacing: 3px;
  margin-top: 5px;
  color: #a9acb5;
}
nav { display: flex; gap: 34px; font-size: 12px; }
nav a { color: #c8cbd2; transition: color 0.2s; }
nav a:hover { color: var(--red); }
.header-actions { display: flex; gap: 15px; align-items: center; }
.header-actions button { border: 0; font-size: 11px; padding: 10px; }
.header-actions button:last-child {
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 22px;
}
.mobile-nav-btn { display: none; }

/* Hero Section with Standing Spider-Man */
.hero {
  position: relative;
  min-height: 850px;
  height: 100svh;
  max-height: 1150px;
  overflow: hidden;
  background: #0a0d14;
}
.hero-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #080c13 2%, rgba(10, 13, 19, 0.85) 40%, rgba(16, 20, 29, 0.15) 75%),
    linear-gradient(0deg, #090c13 0%, transparent 40%),
    url('assets/city.jpg') center/cover no-repeat;
  opacity: .92;
}
.hero:after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .05;
  pointer-events: none;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.6' d='M0 0h200v200H0z'/%3E%3C/svg%3E");
}
.hero-copy {
  position: relative;
  z-index: 3;
  padding: 155px 0 100px 8%;
  max-width: 800px;
}
.hero-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 9px;
  margin-bottom: 50px;
}
.red-line { display: block; width: 30px; height: 1px; background: var(--red); }
h1 {
  font-size: clamp(68px, 8.2vw, 130px);
  letter-spacing: -3px;
  line-height: .81;
  white-space: nowrap;
}
h1 > span {
  display: block;
  color: var(--red);
  font-size: clamp(80px, 10.2vw, 160px);
  line-height: .85;
  margin-top: 15px;
  letter-spacing: -4px;
}
.hero-description {
  margin-top: 28px;
  font-size: 16px;
  line-height: 1.6;
  color: #c7c8cb;
  max-width: 480px;
}
.primary {
  display: inline-flex;
  justify-content: space-between;
  gap: 50px;
  align-items: center;
  background: var(--red);
  color: white;
  border: 0;
  padding: 17px 28px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 30px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(241, 60, 71, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.primary:hover {
  background: #ff5158;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(241, 60, 71, 0.55);
}
.hero-note {
  display: block;
  font-size: 10px;
  letter-spacing: .2px;
  color: #92949c;
  margin-top: 20px;
}
.hero-coordinate {
  position: absolute;
  right: 5%;
  top: 135px;
  font-size: 9px;
  line-height: 1.8;
  letter-spacing: 2px;
  text-align: right;
  color: #d4d3d1;
  z-index: 3;
}
.hero-coordinate span { display: block; margin-top: 12px; color: var(--red); font-size: 8px; }
.hero-bottom {
  position: absolute;
  inset: auto 5% 30px;
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 2px;
  color: #b7bac1;
  z-index: 3;
}

/* Standing Spider-Man Hero Figure */
.hero-character {
  position: absolute;
  right: 6%;
  bottom: 0;
  height: 86%;
  max-height: 900px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 35px rgba(241, 60, 71, 0.22));
  animation: heroFloat 6s ease-in-out infinite alternate;
}
.hero-spider-img {
  height: 100%;
  width: auto;
  max-width: 520px;
  object-fit: contain;
  object-position: bottom;
}
.hero-spider-ambient {
  position: absolute;
  inset: auto 15% 10% 15%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(241, 60, 71, 0.28) 0%, rgba(14, 20, 32, 0) 70%);
  z-index: -1;
  filter: blur(40px);
}
.hero-spider-badge {
  position: absolute;
  bottom: 25px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(9, 13, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 9px;
  letter-spacing: 2px;
  color: #f1f5f9;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}
.hero-spider-badge img {
  width: 15px;
  height: 18px;
  object-fit: contain;
}
@keyframes heroFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.web-corner {
  position: absolute;
  right: -180px;
  top: -300px;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  opacity: .12;
  background: repeating-conic-gradient(from 9deg, #d4dae6 0 .2deg, transparent .2deg 18deg);
  mask-image: radial-gradient(black, transparent 68%);
}

/* Intro Section */
.intro {
  padding: 95px 8%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px 10%;
  border-bottom: 1px solid var(--line);
  background: #0b0f17;
}
.intro > .eyebrow { grid-column: 1/-1; margin: 0; }
.intro > div > p { max-width: 450px; font-size: 14px; }
.intro-stats { display: flex; gap: 60px; margin-top: 28px; }
.intro-stats b { display: block; font: 52px 'Barlow Condensed'; line-height: 1; color: #fff; }
.intro-stats small {
  font-size: 8px;
  letter-spacing: 1px;
  display: block;
  color: var(--muted);
  margin-top: 10px;
}

/* Section Shared */
.journey, .archive, .worlds, .suits { padding: 95px 8%; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 45px;
}
.section-heading > p { font-size: 13px; max-width: 360px; line-height: 1.6; }
.era-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.era-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 13px 20px;
  font-size: 11px;
  border-radius: 0;
}
.era-tabs button[aria-pressed=true] {
  color: var(--ink);
  border-color: var(--red);
  background: rgba(241, 60, 71, 0.08);
}

/* Timeline / Modern Journey */
.timeline-layout { display: grid; grid-template-columns: 130px 1fr; gap: 40px; }
.chapter-map {
  position: sticky;
  top: 40px;
  height: max-content;
  font-size: 10px;
  padding-top: 10px;
}
.chapter-map > p { font-size: 8px; letter-spacing: 2px; margin-bottom: 22px; }
.chapter-map a {
  display: block;
  position: relative;
  color: #727a89;
  padding: 7px 0 7px 15px;
  border-left: 1px solid var(--line);
}
.chapter-map a.active { border-color: var(--red); color: var(--red); }
.chapter-map a.active:before { content: '◆'; position: absolute; left: -4px; font-size: 8px; }
#activeLabel {
  display: block;
  color: #8b929f;
  margin-top: 25px;
  font-size: 9px;
  line-height: 1.5;
  max-width: 110px;
}

.timeline { position: relative; padding-left: 70px; }
.thread {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 23px;
  width: 1px;
  background: linear-gradient(var(--red), #798898 15%, #798898 85%, var(--red));
}
#guide {
  position: absolute;
  left: -5px;
  top: 0;
  width: 58px;
  height: 105px;
  z-index: 3;
  pointer-events: none;
  will-change: transform;
}
.guide-line { position: absolute; left: 28px; bottom: 100px; height: 170px; width: 1px; background: #dce2ed; }
#guide svg { width: 58px; overflow: visible; }
.arm, .leg { stroke: #e73440; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.leg { stroke: #263f71; }
.torso { fill: #d52e3a; stroke: #172337; stroke-width: 2; }
.hero-body { transform-origin: 50px 8px; transition: transform .3s; }

.milestone {
  position: relative;
  margin-bottom: 60px;
  min-height: 390px;
  scroll-margin-top: 50px;
  border-top: 1px solid var(--line);
  padding-top: 25px;
  --accent: #e7b573;
}
.milestone:before {
  content: '';
  position: absolute;
  left: -52px;
  top: 26px;
  width: 10px;
  height: 10px;
  background: #0a0d13;
  border: 1px solid #7f8998;
  transform: rotate(45deg);
}
.milestone.active:before {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 20px rgba(241, 60, 71, 0.5);
}
.film-top {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 20px;
}
.film-content {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 35px;
  align-items: center;
}

/* Film Card & Poster (Fixed Ratio: 2/3) */
.film-image {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  background: #080c14;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6);
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.film-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.film-image:hover img {
  transform: scale(1.04);
}
.art-label {
  position: absolute;
  bottom: 8px;
  inset-inline-start: 8px;
  z-index: 2;
  font-size: 7px;
  letter-spacing: 1.5px;
  color: #f1f5f9;
  background: rgba(9, 13, 20, 0.88);
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.film-text .eyebrow { font-size: 9px; margin-bottom: 12px; color: var(--accent); }
.film-text h3 { font-size: clamp(30px, 3.3vw, 48px); margin-bottom: 16px; color: #fff; }
.film-text p { font-size: 13px; line-height: 1.7; }
.film-meta {
  font-size: 11px;
  color: #b3b7c0;
  margin-top: 17px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.film-money {
  display: flex;
  gap: 30px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.film-money b { font: 28px 'Barlow Condensed'; display: block; color: #f2ede7; }
.film-money small { font-size: 7px; letter-spacing: 1.4px; color: var(--muted); }
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-size: 11px;
  padding: 12px 0;
  border: 0;
  color: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  margin-top: 16px;
  border-radius: 0;
}
.text-button:hover { background: transparent; color: var(--red); border-color: var(--red); }

/* Film Archive & Categories */
.archive { background: #0c1018; border-top: 1px solid var(--line); }

/* Quick Category Pills Bar */
.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 18px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.category-pills::-webkit-scrollbar { display: none; }
.pill-btn {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #0f1420;
  color: var(--muted);
  transition: all 0.25s ease;
}
.pill-btn:hover {
  border-color: var(--red);
  color: #fff;
  background: rgba(241, 60, 71, 0.12);
}
.pill-btn.active, .pill-btn[aria-pressed=true] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(241, 60, 71, 0.35);
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select {
  background: #0f1420;
  border: 1px solid var(--line);
  color: #b9bfca;
  padding: 11px 14px;
  font-size: 11px;
  min-width: 110px;
  border-radius: 4px;
}
.search { position: relative; flex: 1; min-width: 240px; }
.search span {
  position: absolute;
  left: 12px;
  top: 6px;
  font-size: 22px;
  color: #80899a;
}
.search input { width: 100%; padding-left: 42px; }
.filters button { font-size: 11px; padding: 10px 14px; }
.filters button[aria-pressed=true] { border-color: var(--red); color: var(--red); }

.result-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0;
  color: var(--muted);
  font-size: 11px;
}
.result-line button { border: 0; font-size: 11px; padding: 5px 8px; }
.result-line b { background: var(--red); padding: 3px 8px; margin-left: 8px; color: white; border-radius: 3px; }

/* 4-column Archive Grid */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 22px;
}
.archive-card {
  border: 1px solid var(--line);
  background: #111622;
  border-radius: 8px;
  padding: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.archive-card:hover {
  transform: translateY(-4px);
  border-color: rgba(241, 60, 71, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}
.archive-card .film-image {
  aspect-ratio: 2/3;
  width: 100%;
}
.archive-card h3 {
  font-size: 21px;
  margin-top: 14px;
  line-height: 1.1;
  min-height: 46px;
}
.archive-card h3 a { color: #f3f0e8; }
.archive-card h3 a:hover { color: var(--red); }
.card-meta {
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
}
.card-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  gap: 6px;
}
.card-actions button { padding: 6px 10px; font-size: 10px; }
.card-actions button[aria-pressed=true] { border-color: var(--red); color: var(--red); }
.card-compare {
  display: block;
  margin-top: 10px;
  font-size: 10px;
  color: #929baa;
}
.card-compare input { accent-color: var(--red); vertical-align: middle; }
.scope-note { font-size: 11px; margin-top: 35px; max-width: 850px; line-height: 1.7; }

/* Worlds & Suits */
.worlds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12%;
  border-bottom: 1px solid var(--line);
}
.worlds > div > p:last-child { font-size: 13px; margin-top: 25px; max-width: 360px; line-height: 1.6; }
.world-path { padding: 20px 0; border-bottom: 1px solid var(--line); }
.world-path button {
  border: 0;
  padding: 0;
  font: 26px 'Barlow Condensed';
  text-transform: uppercase;
  color: var(--accent);
}
.world-path span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 1px;
}
.world-path span:before {
  content: '● ─── ● ─── ●';
  display: block;
  color: var(--accent);
  font-size: 8px;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

#suitGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.suit-card {
  padding: 30px 20px;
  background: linear-gradient(145deg, #131926 0%, #0c1018 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.suit-card:hover {
  transform: translateY(-4px);
  border-color: var(--red);
}
.suit-card img, .suit-card svg {
  width: 100px;
  height: 120px;
  display: block;
  margin: 0 auto 20px;
  object-fit: contain;
}
.suit-card b { display: block; font: 25px 'Barlow Condensed'; text-transform: uppercase; color: #fff; }
.suit-card p { font-size: 11px; min-height: 50px; margin: 10px 0; line-height: 1.6; }
.suit-card button { font-size: 10px; margin-top: 10px; }

/* Challenge Game */
.challenge {
  margin: 0 8% 90px;
  padding: 45px;
  background: linear-gradient(135deg, #f13c47 0%, #ba1c26 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(241, 60, 71, 0.35);
}
.challenge .eyebrow, .challenge p { color: rgba(255, 255, 255, 0.9); }
.challenge h2 { font-size: 46px; color: #fff; }
.challenge p:not(.eyebrow) { font-size: 13px; max-width: 490px; margin-top: 18px; line-height: 1.6; }
.challenge .primary {
  background: #0a0d13;
  margin-top: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.challenge .primary:hover { background: #161f30; }
.route-art { display: flex; align-items: center; font-size: 26px; transform: rotate(-15deg); width: 30%; }
.route-art i { height: 100px; border-bottom: 1px solid white; border-radius: 50%; width: 100px; }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 50px 5%;
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 1.5fr 1fr;
  gap: 35px;
  align-items: start;
  background: #080b11;
}
footer .brand { font-size: 18px; }
footer p, footer button { font-size: 10px; line-height: 1.8; color: var(--muted); }
footer p a { color: #e5e5ea; }
footer button { border: 0; padding: 0; text-align: left; }

/* Dialogs */
dialog {
  background: #111722;
  color: var(--ink);
  border: 1px solid #3b4352;
  border-radius: 10px;
  padding: 45px;
  width: min(920px, 94vw);
  max-height: 90svh;
  overscroll-behavior: contain;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
}
dialog::backdrop { background: rgba(3, 5, 10, 0.85); backdrop-filter: blur(8px); }
.close {
  position: absolute;
  right: 18px;
  top: 14px;
  font-size: 28px;
  border: 0;
  line-height: 1;
  padding: 8px;
}
.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 35px;
  align-items: center;
}
.detail-head h2 { font-size: 46px; margin: 12px 0; color: #fff; }
.detail-head p { font-size: 13px; line-height: 1.7; }
.detail-head .film-image { aspect-ratio: 2/3; }
.detail-section { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 25px; }
.detail-section h3 { font-size: 26px; margin-bottom: 15px; color: #fff; }
.detail-section p { font-size: 13px; line-height: 1.7; }
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; font-size: 12px; }
.data-grid dt { color: var(--muted); }
.data-grid dd { margin: 0; color: #f3f0e8; font-weight: 500; }
.financial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.financial-grid b { display: block; font: 33px 'Barlow Condensed'; color: #fff; }
.financial-grid small { font-size: 9px; color: var(--muted); }
.split-bar { display: flex; height: 8px; background: #333e50; margin-top: 15px; border-radius: 4px; overflow: hidden; }
.split-bar span { height: 100%; background: var(--red); }
.metric-note { font-size: 10px !important; margin-top: 12px; color: #8890a0; }
.source-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 15px; }

/* Tables & Comparison */
.compare-table { width: 100%; border-collapse: collapse; margin-top: 30px; font-size: 12px; }
.compare-table th, .compare-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: start; }
.compare-table th { color: var(--muted); font-weight: 400; }
.chart-row { display: grid; grid-template-columns: 150px 1fr 65px; gap: 15px; align-items: center; font-size: 11px; margin: 20px 0; }
.chart-bar { height: 12px; background: #222d42; border-radius: 6px; overflow: hidden; }
.chart-bar i { display: block; height: 100%; background: var(--red); }

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #0a0d13;
  padding: 10px 22px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  z-index: 99;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
#game { display: block; width: 100%; background: #09101d; border: 1px solid var(--line); margin: 20px 0; touch-action: none; border-radius: 6px; }
.game-controls { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; }
.game-controls output { padding: 10px; color: var(--red); }
.game-controls button[aria-pressed=true] { background: rgba(241, 60, 71, 0.2); border-color: var(--red); }
.icon { width: 17px; height: 17px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.6; margin-inline-end: 7px; }

/* Arabic RTL Styling */
html[dir=rtl] body { font-family: 'Noto Sans Arabic', sans-serif; }
html[dir=rtl] h1, html[dir=rtl] h2, html[dir=rtl] h3 { font-family: 'Noto Sans Arabic', sans-serif; font-weight: 700; line-height: 1.35; letter-spacing: 0; }
html[dir=rtl] h2 { font-size: 38px; }
html[dir=rtl] .hero-copy { padding-left: 0; padding-right: 8%; text-align: right; }
html[dir=rtl] h1 span { font-family: 'Noto Sans Arabic', sans-serif; font-size: 68px; line-height: 1.25; }
html[dir=rtl] .hero-description { text-align: right; }
html[dir=rtl] .hero-character { right: auto; left: 6%; }
html[dir=rtl] .hero-coordinate { right: auto; left: 5%; text-align: left; }
html[dir=rtl] .search input { padding-left: 14px; padding-right: 42px; text-align: right; }
html[dir=rtl] .search span { left: auto; right: 14px; }
html[dir=rtl] .card-actions { direction: rtl; }
html[dir=rtl] .film-text, html[dir=rtl] .film-top { direction: rtl; text-align: right; }
html[dir=rtl] footer { text-align: right; }
html[dir=rtl] footer button { text-align: right; }
html[dir=rtl] .close { right: auto; left: 18px; }

/* Responsive Media Queries */
@media (min-width: 1600px) {
  body > main > section, footer {
    padding-left: max(8%, calc((100% - 1480px)/2));
    padding-right: max(8%, calc((100% - 1480px)/2));
  }
}

@media (max-width: 1200px) {
  .archive-grid { grid-template-columns: repeat(3, 1fr); }
  #suitGrid { grid-template-columns: repeat(2, 1fr); }
  .film-content { grid-template-columns: 280px 1fr; }
}

@media (max-width: 760px) {
  header { height: 76px; padding: 0 5%; }
  .brand { font-size: 20px; }
  .mobile-nav-btn { display: block; font-size: 22px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px; }
  nav { display: none; }
  nav.mobile-open {
    display: flex !important;
    position: fixed;
    inset: 76px 0 0 0;
    background: #090d14 !important;
    flex-direction: column;
    padding: 35px 8%;
    gap: 24px;
    font-size: 18px;
    z-index: 9999;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
    border-top: 1px solid var(--line);
  }
  .header-actions { gap: 8px; }
  .header-actions button { font-size: 10px; padding: 8px 10px; }

  .hero { min-height: 0; height: auto; min-height: 100svh; padding-bottom: 50px; }
  .hero-copy { padding: 105px 6% 15px; position: relative; z-index: 5; }
  .hero h1 { font-size: 52px; white-space: normal; }
  .hero h1 span { font-size: 62px; }
  .hero-coordinate { display: none; }
  .hero-note { display: none; }
  .hero-description { font-size: 14px; max-width: 320px; }
  
  .hero-character {
    inset-inline-end: -15% !important;
    inset-inline-start: auto !important;
    transform: none !important;
    height: 62%;
    opacity: 0.36;
    bottom: 0;
    z-index: 1;
  }
  .hero-spider-badge { display: none; }
  .hero-spider-img { max-width: 320px; }
  .hero-bottom { position: relative; inset: auto; margin: 25px 6% 0; }
  
  .intro, .journey, .archive, .worlds, .suits { padding: 65px 6%; }
  .intro { grid-template-columns: 1fr; gap: 25px; }
  .timeline-layout { display: block; }
  .chapter-map { position: relative; top: 0; margin-bottom: 25px; }
  .chapter-map > p, #activeLabel { display: none; }
  #chapterLinks { display: flex; overflow-x: auto; gap: 6px; padding: 8px 0; }
  #chapterLinks a { padding: 7px 12px; border: 1px solid var(--line); white-space: nowrap; font-size: 9px; }
  .timeline { padding-left: 36px; }
  .thread { left: 8px; }
  .milestone:before { left: -33px; }
  .film-content { grid-template-columns: 1fr; gap: 20px; }
  .film-image { aspect-ratio: 2/3 !important; max-width: 340px; margin: 0 auto; width: 100%; }

  .archive-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .archive-card h3 { font-size: 18px; min-height: 40px; }
  .archive-card { padding: 10px; }
  .filters select { min-width: 0; flex: 1 1 44%; font-size: 10px; }
  .filters .search { flex: 1 1 100%; }
  
  .worlds { grid-template-columns: 1fr; gap: 30px; }
  #suitGrid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .challenge { margin: 0 6% 60px; padding: 28px; display: block; }
  .challenge h2 { font-size: 34px; }
  .route-art { display: none; }
  footer { grid-template-columns: 1fr; gap: 25px; padding: 35px 6%; }
  dialog { padding: 35px 18px 25px; }
  .detail-head { grid-template-columns: 1fr; gap: 18px; text-align: center; }
  .detail-head .film-image { max-width: 220px; margin: 0 auto; }
}

@media (max-width: 480px) {
  .archive-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
