/* ===========================
   ROOT & RESET
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Palette ── */
  --navy:      #08192d;
  --deep:      #0d2c49;
  --mid:       #16456c;
  --surface:   #1f5f8f;
  --card:      #1a4f78;
  --border:    rgba(255,236,198,0.18);
  --gold:      #e5b24d;
  --gold-l:    #f9da89;
  --gold-dim:  #a8762a;
  --red:       #cf4f33;
  --teal:      #3dc2ae;
  --sky:       #74b5e8;
  --sand:      #f3dfb4;
  --white:     #fff7ea;
  --muted:     rgba(255,247,234,0.78);
  --subtle:    rgba(255,247,234,0.56);

  /* ── Arc type colours ── */
  --canon-bg:   rgba(61,194,174,0.16);
  --canon-b:    rgba(61,194,174,0.42);
  --canon-txt:  #89ecd9;
  --filler-bg:  rgba(207,79,51,0.16);
  --filler-b:   rgba(207,79,51,0.42);
  --filler-txt: #ffb097;
  --mixed-bg:   rgba(137,116,214,0.16);
  --mixed-b:    rgba(137,116,214,0.4);
  --mixed-txt:  #cec1ff;
  --anime-bg:   rgba(229,178,77,0.16);
  --anime-b:    rgba(229,178,77,0.36);
  --anime-txt:  #f9da89;

  /* ── Radii ── */
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-xl: 40px;

  /* ── Verdict colours (movies/specials) ── */
  --recommended-txt: #6ee7b7;
  --recommended-bg:  rgba(110,231,183,0.14);
  --recommended-b:   rgba(110,231,183,0.4);
  --skip-txt:        #ffb097;
  --skip-bg:         rgba(207,79,51,0.14);
  --skip-b:          rgba(207,79,51,0.4);
}

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(circle at 16% -8%, rgba(249,218,137,0.3) 0%, rgba(249,218,137,0) 40%),
    radial-gradient(circle at 82% 2%,  rgba(116,181,232,0.22) 0%, rgba(116,181,232,0) 36%),
    linear-gradient(180deg, #1f5483 0%, #12385d 44%, #08192d 100%);
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15.5px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ===========================
   SCROLLBAR
=========================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

/* ===========================
   CANVAS BACKGROUND
=========================== */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background: transparent;
  transition: opacity 0.6s ease;
}

#bg-canvas.hidden {
  opacity: 0;
  pointer-events: none;
}

body > *:not(#bg-canvas):not(#backToTop) {
  position: relative;
  z-index: 1;
}

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px 80px;
  z-index: 1;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 88% 64% at 50% 38%, rgba(41,95,143,0.2) 0%, rgba(14,43,71,0.68) 58%, rgba(7,23,38,0.92) 100%);
  z-index: -1;
}

.hero-emblem {
  width: 108px;
  height: 108px;
  padding: 22px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(249,218,137,0.24), rgba(255,255,255,0.04));
  border: 1px solid rgba(249,218,137,0.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    0 20px 60px rgba(7,18,31,0.26),
    0 0 44px rgba(229,178,77,0.18);
  animation: float 5s ease-in-out infinite;
}

.hero-emblem .icon {
  width: 100%;
  height: 100%;
  stroke-width: 1.6;
}

@keyframes float {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}

.hero-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 6px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.8;
}

.hero-title {
  font-family: 'Pirata One', cursive;
  font-size: clamp(64px, 12vw, 130px);
  line-height: 0.9;
  color: var(--white);
  text-shadow:
    0 0 60px rgba(212,164,42,0.35),
    0 4px 0 rgba(0,0,0,0.5);
  letter-spacing: 4px;
  position: relative;
  -webkit-text-stroke: 1px rgba(212,164,42,0.3);
}

.hero-title span {
  color: var(--gold);
  -webkit-text-stroke: 1px rgba(255,200,60,0.5);
}

.hero-sub {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(16px, 2.5vw, 22px);
  color: rgba(255,247,234,0.84);
  font-style: italic;
  margin: 20px 0 36px;
  max-width: 620px;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Shared flex layout for icon+label elements */
.btn-primary,
.btn-secondary,
.nav-logo,
.skip-title,
.timeskip-label,
.footer-title,
.label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 50px;
  padding: 14px 36px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s;
  box-shadow: 0 0 40px rgba(212,164,42,0.4);
}

.btn-primary:hover {
  background: var(--gold-l);
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(212,164,42,0.6);
}

.btn-secondary {
  background: rgba(255,247,234,0.06);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  padding: 14px 36px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255,247,234,0.14);
  border-color: rgba(255,255,255,0.4);
}

.hero-scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: scrollFadeIn 1.8s ease forwards, scrollPulse 3s ease-in-out 1.8s infinite;
}

@keyframes scrollFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 0.68; transform: translateX(-50%) translateY(0); }
}

@keyframes scrollPulse {
  0%,100% { opacity: 0.68; }
  50%      { opacity: 0.35; }
}

.hero-scroll span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
}

.hero-scroll svg {
  animation: scrollArrowBounce 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 0px rgba(229,178,77,0));
}

@keyframes scrollArrowBounce {
  0%   { transform: translateY(0);   filter: drop-shadow(0 0 0px  rgba(229,178,77,0)); }
  40%  { transform: translateY(7px); filter: drop-shadow(0 4px 6px rgba(229,178,77,0.55)); }
  60%  { transform: translateY(7px); filter: drop-shadow(0 4px 6px rgba(229,178,77,0.55)); }
  100% { transform: translateY(0);   filter: drop-shadow(0 0 0px  rgba(229,178,77,0)); }
}

/* ===========================
   WAVE DIVIDER
=========================== */
.wave-divider {
  position: relative;
  height: 96px;
  margin-top: -1px;
  background: linear-gradient(180deg, rgba(13,33,55,0) 0%, rgba(24,67,104,0.72) 50%, var(--deep) 100%);
  z-index: 2;
  border-bottom: 2px solid rgba(255,236,198,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.24);
}

.wave-divider__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(100% 64px at 50% 0, rgba(229,178,77,0.12), rgba(116,181,232,0.05) 42%, transparent 70%);
}

/* ===========================
   MAIN CONTENT
=========================== */
.content {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255,247,234,0.04), rgba(255,247,234,0) 14%),
    rgba(13,44,73,0.82);
}

/* ===========================
   NAV BAR
=========================== */
.top-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 100;
  background: rgba(8,25,44,0.86);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom-color: rgba(255,236,198,0.18);
  border-radius: 40px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  width: calc(100% - 40px);
  max-width: 1400px;
  box-shadow: 0 12px 34px rgba(4,12,22,0.24), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), opacity 0.6s cubic-bezier(0.16,1,0.3,1);
}

.top-nav.nav-hidden {
  transform: translateX(-50%) translateY(-150%);
  opacity: 0;
  pointer-events: none;
}

.nav-logo {
  font-family: 'Pirata One', cursive;
  font-size: 20px;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 8px;
  letter-spacing: 0.04em;
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

.nav-filters {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-btn:hover          { background: rgba(255,255,255,0.06); color: var(--white); }
.nav-btn.active         { background: var(--canon-bg); border-color: var(--canon-b); color: var(--canon-txt); }
.nav-btn.filler-active  { background: var(--filler-bg); border-color: var(--filler-b); color: var(--filler-txt); }
.nav-btn.gold-active    { background: rgba(212,164,42,0.15); border-color: rgba(212,164,42,0.5); color: var(--gold); }
.nav-btn.section-active { background: rgba(110,231,183,0.14); border-color: rgba(110,231,183,0.4); color: #6ee7b7; }

.nav-search-wrap {
  position: relative;
  margin-left: auto;
  width: 180px;
  flex-shrink: 0;
}

.nav-search {
  width: 100%;
  background-color: rgba(255,247,234,0.08);
  border: 1px solid rgba(255,236,198,0.2);
  border-radius: 20px;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  padding: 5px 28px 5px 32px;
  outline: none;
  transition: border-color 0.3s, background-color 0.3s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff55'%3E%3Ccircle cx='6.5' cy='6.5' r='4.5' stroke='%23ffffff55' stroke-width='1.5' fill='none'/%3E%3Cpath d='M10 10l3 3' stroke='%23ffffff55' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 14px;
}

#clearSearch {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--subtle);
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

#clearSearch:hover {
  color: var(--white);
}

#clearSearch.hidden {
  display: none;
}

.nav-search:focus {
  border-color: rgba(249,218,137,0.52);
  background-color: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(229,178,77,0.16);
}

.nav-search::placeholder { color: var(--subtle); }

/* ===========================
   SECTION HEADING
=========================== */
.section-heading {
  text-align: center;
  padding: 60px 24px 40px;
}

.section-heading .eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.8;
}

.section-heading h2 {
  font-family: 'Pirata One', cursive;
  font-size: clamp(32px, 5vw, 52px);
  color: var(--white);
  line-height: 1;
  text-shadow: 0 0 40px rgba(212,164,42,0.2);
}

.section-heading p,
.legend-item,
.saga-tagline,
.arc-sub-ep,
.detail-label,
.footer-meta {
  color: rgba(255,247,234,0.74);
}

.section-heading p {
  font-family: 'Crimson Pro', serif;
  font-size: 17px;
  max-width: 520px;
  margin: 12px auto 0;
  font-style: italic;
}

/* ===========================
   LEGEND BAR
=========================== */
.legend-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
  padding: 0 24px 32px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
}

.legend-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===========================
   QUICK SKIP PANEL
=========================== */
.skip-panel {
  margin: 0 auto 48px;
  max-width: 1100px;
  padding: 0 20px;
}

.skip-inner {
  background:
    linear-gradient(135deg, rgba(207,79,51,0.2), rgba(229,178,77,0.08) 48%, rgba(255,247,234,0.03)),
    rgba(255,247,234,0.02);
  border: 1px solid rgba(207,79,51,0.34);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(4,13,24,0.2);
}

.skip-inner::before {
  content: '';
  position: absolute;
  right: -10px; top: 50%;
  transform: translateY(-50%);
  width: 110px; height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,176,120,0.2) 0%, rgba(255,176,120,0.04) 48%, rgba(255,176,120,0) 72%);
  pointer-events: none;
}

.skip-title {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--filler-txt);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.skip-content {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}

.skip-ep {
  display: inline-block;
  background: rgba(220,80,20,0.18);
  border: 1px solid rgba(220,80,20,0.35);
  color: var(--filler-txt);
  padding: 1px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  margin: 2px 3px;
  font-variant-numeric: tabular-nums;
}

.skip-watch {
  display: inline-block;
  background: rgba(26,158,110,0.18);
  border: 1px solid rgba(26,158,110,0.35);
  color: var(--canon-txt);
  padding: 1px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  margin: 2px 3px;
}

/* ===========================
   SAGAS CONTAINER
=========================== */
.sagas-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===========================
   SAGA CARD
=========================== */
.saga-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(255,236,198,0.16);
  background: linear-gradient(180deg, rgba(255,247,234,0.06), rgba(255,247,234,0.025));
  box-shadow: 0 22px 48px rgba(6,16,30,0.18);
  animation: fadeInUp 0.5s ease both;
  transition: border-color 0.3s, transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.4s ease;
  content-visibility: auto;
  contain-intrinsic-size: 0 88px;
}

.saga-card:hover {
  border-color: rgba(212,164,42,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Staggered entrance */
.saga-card:nth-child(1)  { animation-delay: 0.05s; }
.saga-card:nth-child(2)  { animation-delay: 0.10s; }
.saga-card:nth-child(3)  { animation-delay: 0.15s; }
.saga-card:nth-child(4)  { animation-delay: 0.20s; }
.saga-card:nth-child(5)  { animation-delay: 0.25s; }
.saga-card:nth-child(6)  { animation-delay: 0.30s; }
.saga-card:nth-child(7)  { animation-delay: 0.35s; }
.saga-card:nth-child(8)  { animation-delay: 0.40s; }
.saga-card:nth-child(9)  { animation-delay: 0.45s; }
.saga-card:nth-child(10) { animation-delay: 0.50s; }
.saga-card:nth-child(11) { animation-delay: 0.55s; }

/* Per-saga gradient backgrounds */
.saga-east     { background: linear-gradient(135deg, #2b628d 0%, #2f8498 100%); }
.saga-arabasta { background: linear-gradient(135deg, #7b4a22 0%, #a06a34 100%); }
.saga-sky      { background: linear-gradient(135deg, #4a68a4 0%, #65539a 100%); }
.saga-water7   { background: linear-gradient(135deg, #2a6886 0%, #2c8c88 100%); }
.saga-thriller { background: linear-gradient(135deg, #4f3a62 0%, #2f5274 100%); }
.saga-summit   { background: linear-gradient(135deg, #75363e 0%, #2f5f69 100%); }
.saga-fishman  { background: linear-gradient(135deg, #245a82 0%, #3281a8 100%); }
.saga-dressrosa{ background: linear-gradient(135deg, #7f396e 0%, #9b454f 100%); }
.saga-wholecake{ background: linear-gradient(135deg, #87548f 0%, #70529d 100%); }
.saga-wano     { background: linear-gradient(135deg, #855425 0%, #578140 100%); }
.saga-final    { background: linear-gradient(135deg, #3464a8 0%, #8f4467 100%); }
.saga-movies   { background: linear-gradient(135deg, #2a2060 0%, #1e4c84 100%); }
.saga-specials { background: linear-gradient(135deg, #1a4a5a 0%, #2e3a72 100%); }

.saga-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background 0.2s;
}

.saga-header:hover { background: rgba(255,247,234,0.06); }

.saga-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 76px;
  font-family: 'Pirata One', cursive;
  color: var(--gold);
  background: var(--surface);
  line-height: 0;
  flex-shrink: 0;
  border: 1px solid rgba(255,236,198,0.18);
  overflow: hidden;
  user-select: none;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,247,234,0.1);
}

.saga-meta { flex: 1; min-width: 0; }

.saga-number {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--gold);
  opacity: 0.7;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.saga-name {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

.saga-tagline {
  font-size: 12px;
  margin-top: 3px;
}

.saga-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.saga-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.badge-ep {
  background: rgba(26,158,110,0.12);
  border: 1px solid rgba(26,158,110,0.3);
  color: var(--canon-txt);
}

.badge-ch {
  background: rgba(32,128,192,0.12);
  border: 1px solid rgba(32,128,192,0.3);
  color: #70b8e8;
}

.saga-chevron,
.arc-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.saga-chevron {
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
  margin-left: 8px;
  line-height: 1;
}

.saga-chevron.open { transform: rotate(180deg); }

.saga-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s cubic-bezier(0.25,1,0.5,1);
}

.saga-body.open {
  grid-template-rows: 1fr;
}

.saga-body > .saga-body-inner {
  overflow: hidden;
  padding: 0 18px;
}

/* ===========================
   SAGA FACT BOX
=========================== */
.fact-box {
  background: rgba(229,178,77,0.13);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  color: rgba(255,247,234,0.86);
  line-height: 1.7;
}

.fact-box strong { color: var(--gold); }

/* ===========================
   ARC CARD
=========================== */
.arc-card {
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,236,198,0.14);
  background: rgba(255,247,234,0.07);
  transition: border-color 0.3s, background 0.3s, transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
}

.arc-card:hover {
  background: rgba(255,247,234,0.1);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.1);
}

.arc-card[data-type="filler"]      { border-left: 3px solid rgba(220,80,20,0.45); }
.arc-card[data-type="canon"]       { border-left: 3px solid rgba(26,158,110,0.45); }
.arc-card[data-type="mixed"]       { border-left: 3px solid rgba(120,90,200,0.45); }
.arc-card[data-type="anime"]       { border-left: 3px solid rgba(200,150,30,0.45); }
.arc-card[data-type="recommended"] { border-left: 3px solid rgba(110,231,183,0.5); }
.arc-card[data-type="skip"]        { border-left: 3px solid rgba(220,80,20,0.45); }

.arc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.arc-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.arc-card[data-type="canon"]       .arc-dot { background: var(--canon-txt);      box-shadow: 0 0 8px var(--canon-b);  }
.arc-card[data-type="filler"]      .arc-dot { background: var(--filler-txt);     box-shadow: 0 0 8px var(--filler-b); }
.arc-card[data-type="mixed"]       .arc-dot { background: var(--mixed-txt);      box-shadow: 0 0 8px var(--mixed-b);  }
.arc-card[data-type="anime"]       .arc-dot { background: var(--gold);            box-shadow: 0 0 10px rgba(220,165,76,0.3); }
.arc-card[data-type="recommended"] .arc-dot { background: var(--recommended-txt); box-shadow: 0 0 8px var(--recommended-b); }
.arc-card[data-type="skip"]        .arc-dot { background: var(--filler-txt);     box-shadow: 0 0 8px var(--filler-b); }

.arc-name-wrap { flex: 1; min-width: 0; }

.arc-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}

.arc-sub-ep {
  font-size: 11px;
  margin-top: 1px;
}

.arc-type-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.1);
}

.tag-canon       { background: var(--canon-bg);  color: var(--canon-txt);  border: 1px solid var(--canon-b);  }
.tag-filler      { background: var(--filler-bg); color: var(--filler-txt); border: 1px solid var(--filler-b); }
.tag-mixed       { background: var(--mixed-bg);  color: var(--mixed-txt);  border: 1px solid var(--mixed-b);  }
.tag-anime       { background: var(--anime-bg);  color: var(--anime-txt);  border: 1px solid var(--anime-b);  }
.tag-recommended { background: var(--recommended-bg); color: var(--recommended-txt); border: 1px solid var(--recommended-b); }
.tag-skip        { background: var(--filler-bg); color: var(--filler-txt); border: 1px solid var(--filler-b); }

.arc-expand-btn {
  background: none;
  border: none;
  color: var(--subtle);
  font-size: 12px;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s, transform 0.3s;
  flex-shrink: 0;
}

.arc-expand-btn.open { transform: rotate(180deg); color: var(--muted); }

/* ARC DETAIL */
.arc-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s cubic-bezier(0.25,1,0.5,1);
  background: rgba(6,14,24,0.16);
  border-top: 1px solid transparent;
}

.arc-detail.open {
  grid-template-rows: 1fr;
  border-top-color: var(--border);
}

.arc-detail > .arc-detail-inner {
  overflow: hidden;
  padding: 0 16px;
}

.arc-detail.open > .arc-detail-inner {
  padding: 14px 16px 16px;
}

.detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-cell {
  background: rgba(8, 25, 44, 0.5); /* Sleek, dark inset */
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  flex: 1 1 160px; /* Fluid flex sizing */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 247, 234, 0.6);
  margin-bottom: 4px;
  font-weight: 600;
}

.detail-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  letter-spacing: 0px;
}

.arc-desc {
  font-family: 'Crimson Pro', serif;
  font-size: 15px;
  color: rgba(255,247,234,0.86);
  line-height: 1.75;
  margin-bottom: 12px;
}

/* Callout boxes */
.arc-trivia,
.arc-filler-note,
.arc-legendary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 9px 13px;
  font-size: 12px;
  line-height: 1.7;
  margin-top: 8px;
}

.arc-trivia {
  background: rgba(116,181,232,0.14);
  border-left: 2px solid rgba(32,128,192,0.5);
  color: #d6ecff;
}

.arc-filler-note {
  background: rgba(207,79,51,0.12);
  border-left: 2px solid rgba(220,80,20,0.5);
  color: var(--filler-txt);
}

.arc-legendary {
  background: rgba(229,178,77,0.16);
  border: 1px solid rgba(229,178,77,0.34);
  border-radius: var(--radius-sm);
  color: var(--gold);
}

.callout-copy { min-width: 0; }

/* ===========================
   TIME SKIP DIVIDER
=========================== */
.timeskip-divider {
  position: relative;
  text-align: center;
  padding: 40px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.timeskip-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 10%;
  width: 38%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}

.timeskip-divider::after {
  content: '';
  position: absolute;
  top: 50%; right: 10%;
  width: 38%;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}

.timeskip-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(229,178,77,0.16);
  border: 1px solid rgba(229,178,77,0.34);
  border-radius: 50px;
  padding: 14px 32px;
  box-shadow: 0 18px 36px rgba(7,18,31,0.18);
}

.timeskip-label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
}

.timeskip-title {
  font-family: 'Pirata One', cursive;
  font-size: 24px;
  color: var(--gold-l);
}

/* ===========================
   OFFICIAL LINKS
=========================== */
.links-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255,247,234,0.09), rgba(255,247,234,0.05));
  border: 1px solid rgba(255,236,198,0.16);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 18px 34px rgba(6,14,25,0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.link-card:hover {
  border-color: rgba(212,164,42,0.35);
  background: rgba(212,164,42,0.06);
  transform: translateY(-2px);
}

.link-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255,236,198,0.18);
  box-shadow: inset 0 1px 0 rgba(255,247,234,0.1);
}

.link-icon-wrap.link-text-icon {
  font-family: 'Pirata One', cursive;
  font-size: 52px;
  color: rgba(255,255,255,0.45);
  line-height: 0;
  user-select: none;
}

.link-icon-wrap img             { width: 100%; height: 100%; object-fit: contain; }
.link-icon-wrap img.icon-sm     { width: 55%; height: 55%; }
.link-text-wrap .link-name      { font-size: 13px; font-weight: 600; color: var(--white); }
.link-text-wrap .link-desc      { font-size: 11px; margin-top: 2px; }



/* ===========================
   FOOTER
=========================== */
.site-footer {
  background:
    linear-gradient(180deg, rgba(255,247,234,0.04), rgba(255,247,234,0)),
    #08192d;
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-title {
  font-family: 'Pirata One', cursive;
  font-size: 36px;
  color: var(--gold);
  margin-bottom: 10px;
  text-shadow: 0 0 30px rgba(212,164,42,0.3);
}

.footer-quote {
  font-family: 'Crimson Pro', serif;
  font-size: 16px;
  font-style: italic;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

.footer-meta {
  font-size: 11px;
  line-height: 1.8;
}

/* ===========================
   HIDDEN / FILTER STATES
=========================== */
.hidden { display: none !important; }

.no-results {
  text-align: center;
  padding: 60px 24px;
  font-family: 'Crimson Pro', serif;
  font-size: 18px;
  font-style: italic;
  display: none;
}

.no-results.show { display: block; }



/* ===========================
   ICONS
=========================== */
.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  pointer-events: none;
}

/* Context-specific icon sizes */
.stat-chip .icon,
.btn-primary .icon,
.btn-secondary .icon,
.nav-logo .icon,
.skip-title .icon,
.timeskip-label .icon,
.callout-icon .icon,


.link-icon-wrap .icon  { width: 18px; height: 18px; }
.saga-icon-wrap .icon  { width: 24px; height: 24px; }
.footer-title .icon    { width: 22px; height: 22px; stroke-width: 1.6; }
.chevron-icon          { width: 16px; height: 16px; }

.callout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}


/* Icon image (external img tag fallback) */
.icon-image {
  display: inline-block;
  width: 1em; height: 1em;
  object-fit: contain;
  flex-shrink: 0;
}

.hero-emblem .icon-image       { width: 100%; height: 100%; }
.nav-logo .icon-image          { width: 28px; height: 28px; }
.footer-title .icon-image      { width: 30px; height: 30px; }
.link-icon-wrap .icon-image    { width: 18px; height: 18px; }

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===========================
   MEDIA SECTIONS (Movies / TV Specials)
=========================== */
.media-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.media-legend-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
  padding: 0 24px 28px;
}

/* ── Verdict colour tokens (plain CSS, not custom properties) ── */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.media-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,247,234,0.08), rgba(255,247,234,0.03));
  border: 1px solid rgba(255,236,198,0.15);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(5,13,24,0.2);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), border-color 0.3s, box-shadow 0.3s;
  animation: fadeInUp 0.5s ease both;
}

.media-card:hover {
  transform: translateY(-3px) scale(1.005);
  border-color: rgba(212,164,42,0.28);
  box-shadow: 0 24px 52px rgba(5,13,24,0.3);
}

/* Verdict-specific left accent */
.media-card[data-verdict="recommended"] {
  border-left: 3px solid rgba(110,231,183,0.55);
}
.media-card[data-verdict="skip"] {
  border-left: 3px solid rgba(207,79,51,0.45);
}

.media-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
  background: rgba(255,247,234,0.04);
  border-bottom: 1px solid rgba(255,236,198,0.1);
}

.media-number {
  font-family: 'Pirata One', cursive;
  font-size: 22px;
  color: var(--gold-dim);
  line-height: 1;
  flex-shrink: 0;
  min-width: 32px;
}

.media-meta {
  flex: 1;
  min-width: 0;
}

.media-title {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-year {
  font-size: 10px;
  color: var(--subtle);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* Verdict tags */
.media-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.tag-recommended {
  background: rgba(110,231,183,0.16);
  border: 1px solid rgba(110,231,183,0.4);
  color: #6ee7b7;
}

.tag-skip {
  background: rgba(207,79,51,0.16);
  border: 1px solid rgba(207,79,51,0.4);
  color: var(--filler-txt);
}

/* Card body */
.media-body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* "Watch after Ep X" pill */
.media-watch-after {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(229,178,77,0.12);
  border: 1px solid rgba(229,178,77,0.28);
  border-radius: 20px;
  padding: 4px 12px 4px 8px;
  width: fit-content;
}

.media-watch-label {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--gold-dim);
  text-transform: uppercase;
}

.media-watch-ep {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-l);
}

.media-desc {
  font-family: 'Crimson Pro', serif;
  font-size: 14px;
  color: rgba(255,247,234,0.84);
  line-height: 1.7;
}

.media-note {
  font-size: 11.5px;
  line-height: 1.65;
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.media-card[data-verdict="recommended"] .media-note {
  background: rgba(110,231,183,0.1);
  border-left: 2px solid rgba(110,231,183,0.45);
  color: #a7f3d0;
}

.media-card[data-verdict="skip"] .media-note {
  background: rgba(207,79,51,0.1);
  border-left: 2px solid rgba(207,79,51,0.4);
  color: var(--filler-txt);
}

/* Staggered animation for media cards */
.media-card:nth-child(1)  { animation-delay: 0.04s; }
.media-card:nth-child(2)  { animation-delay: 0.08s; }
.media-card:nth-child(3)  { animation-delay: 0.12s; }
.media-card:nth-child(4)  { animation-delay: 0.16s; }
.media-card:nth-child(5)  { animation-delay: 0.20s; }
.media-card:nth-child(6)  { animation-delay: 0.24s; }
.media-card:nth-child(7)  { animation-delay: 0.28s; }
.media-card:nth-child(8)  { animation-delay: 0.32s; }
.media-card:nth-child(9)  { animation-delay: 0.36s; }
.media-card:nth-child(10) { animation-delay: 0.40s; }
.media-card:nth-child(11) { animation-delay: 0.44s; }
.media-card:nth-child(12) { animation-delay: 0.48s; }
.media-card:nth-child(13) { animation-delay: 0.52s; }
.media-card:nth-child(14) { animation-delay: 0.56s; }

@media (max-width: 640px) {
  .media-grid { grid-template-columns: 1fr; }
  .media-section { padding: 0 12px 40px; }
  .media-title { white-space: normal; }
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
}

/* ── 640 px ── hide logo/divider, tighten spacing */
@media (max-width: 640px) {
  .saga-badges     { display: none; }
  .saga-name       { font-size: 15px; }
  .sagas-container { padding: 0 12px 60px; }
  .skip-panel      { padding: 0 12px; }
  .links-section   { padding: 0 12px 60px; }
  .stats-row       { grid-template-columns: repeat(2, 1fr); padding: 0 12px 40px; }

  .hero-emblem     { width: 92px; height: 92px; padding: 20px; }
  .btn-primary,
  .btn-secondary   { width: 100%; justify-content: center; }
  .callout-icon    { width: 16px; height: 16px; }

  /* Nav: hide logo & divider, tighten up */
  .nav-logo,
  .nav-divider  { display: none; }

  .top-nav {
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 6px 8px;
    border-radius: 18px;
    height: auto;
  }

  .nav-filters    { gap: 5px; }

  .nav-search-wrap {
    width: 100%;
    margin-left: 0;
  }

  .nav-btn {
    padding: 4px 10px;
    font-size: 10px;
    letter-spacing: 0.3px;
  }
}

@media (max-width: 480px) {
  .nav-btn {
    flex: 1;
    justify-content: center;
    padding: 4px 6px;
    font-size: 9px;
  }

  .nav-filters        { width: 100%; }
}


@media (prefers-reduced-motion: reduce) {
  .hero-emblem { animation: none; }
  .saga-card   { animation: none; }
}

/* ===========================
   BACK TO TOP BUTTON
=========================== */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: rgba(8,25,44,0.86);
  border: 1px solid rgba(255,236,198,0.2);
  border-radius: 50%;
  color: var(--gold);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(4,12,22,0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s, opacity 0.3s, border-color 0.3s, background 0.3s;
}

#backToTop:hover {
  background: rgba(8,25,44,0.95);
  border-color: rgba(212,164,42,0.5);
  transform: translateY(-4px);
}

#backToTop.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

@media (max-width: 640px) {
  #backToTop {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}