/* ============================================================
 * 战争史诗 · 时间轴 —— 样式
 * 视觉语言参考 Netflix：深灰底(#141414)、红色品牌点缀、纯海报卡片、
 * 悬停展开信息、头图 billboard、横向海报行
 * 结构：固定导航 → 头图(精选战争) → 时代(战争时间轴 + 作品海报行) → 弹层
 * ============================================================ */
:root {
  --bg: #141414;
  --elev: #181818;
  --elev-2: #232323;
  --red: #e50914;
  --txt: #ffffff;
  --txt-2: #b3b3b3;
  --txt-3: #8c8c8c;
  --txt-4: #6e6e6e;
  --hair: rgba(255, 255, 255, .14);
  --pad-x: clamp(18px, 4vw, 52px);
  --nav-h: 68px;
  --card-w: 150px;
  --card-h: 225px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: "Netflix Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; }
button { font-family: inherit; }

/* ============================================================
 * 顶部导航：初始透明浮于头图之上，滚动后转实底
 * ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--nav-h);
  background: linear-gradient(180deg, rgba(0, 0, 0, .75) 10%, rgba(0, 0, 0, 0) 100%);
  transition: background .32s ease;
}
.nav.solid { background: var(--bg); box-shadow: 0 1px 0 rgba(255, 255, 255, .07); }

.nav-in {
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  padding: 0 var(--pad-x);
}

.logo {
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--red);
  text-decoration: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
  flex: none;
}

.nav-links {
  display: flex;
  gap: clamp(12px, 1.7vw, 24px);
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-link {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--txt-2);
  font-size: 13.5px;
  padding: 4px 0;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s, border-color .18s;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: #fff; font-weight: 600; border-bottom-color: var(--red); }

.nav-meta {
  margin-left: auto;
  flex: none;
  font-size: 12px;
  color: var(--txt-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
 * 头图 billboard：精选战争
 * ============================================================ */
.billboard {
  position: relative;
  height: clamp(430px, 76vh, 660px);
  overflow: hidden;
  background: #0d0d0d;
}
/* 头图背景：由多张海报拼成，整体模糊后形成连贯的背板画面 */
.bb-art {
  position: absolute;
  inset: -8% -3%;
  display: flex;
  overflow: hidden;
  filter: blur(20px) brightness(.8) saturate(1.4) contrast(1.05);
  transform: scale(1.12);
}
.bb-art i, .mh-art i {
  flex: 1 1 0;
  background-size: cover;
  background-position: center 30%;
}
.bb-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 20, 20, .93) 0%, rgba(20, 20, 20, .66) 36%, rgba(20, 20, 20, .1) 68%, rgba(20, 20, 20, .5) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(20, 20, 20, 0) 46%);
}
.bb-in {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: var(--nav-h) var(--pad-x) 0;
  max-width: 1560px;
  margin: 0 auto;
}
.bb-text { min-width: 0; max-width: 660px; }

.bb-kicker {
  font-size: 12px;
  letter-spacing: 3.5px;
  color: #cfcfcf;
  font-weight: 500;
}
.bb-title {
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.5px;
  margin: 13px 0 15px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .75);
}
.bb-sub { font-size: 14.5px; color: #c9c9c9; margin-bottom: 12px; }
.bb-brief {
  font-size: 15px;
  line-height: 1.78;
  color: #d6d6d6;
  max-width: 33em;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bb-acts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.bb-facts {
  margin-top: 18px;
  font-size: 12.5px;
  color: #9a9a9a;
  font-variant-numeric: tabular-nums;
}
.bb-poster {
  flex: none;
  width: 216px;
  height: 324px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 28px 64px rgba(0, 0, 0, .75);
  background: #232323;
}

/* Netflix 式按钮：主按钮白底黑字，次按钮半透明灰 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 4px;
  transition: background .18s, transform .18s;
}
.btn:active { transform: scale(.98); }
.btn-play { background: #fff; color: #141414; }
.btn-play:hover { background: rgba(255, 255, 255, .8); }
.btn-ghost { background: rgba(109, 109, 110, .68); color: #fff; }
.btn-ghost:hover { background: rgba(109, 109, 110, .48); }

/* ============================================================
 * 时代区块：标题 → 战争时间轴 → 作品海报行
 * ============================================================ */
.rows {
  position: relative;
  z-index: 3;
  margin-top: -58px;
  padding-bottom: 8px;
}

.era { padding: 0 var(--pad-x); margin-bottom: 30px; }

.era-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0 8px 9px;
}
.era-name {
  font-size: clamp(17px, 1.55vw, 22px);
  font-weight: 700;
  color: #e5e5e5;
  letter-spacing: .3px;
}
.era-range, .era-count {
  font-size: 12px;
  color: var(--txt-3);
  font-variant-numeric: tabular-nums;
}
.era-count { margin-left: auto; }

/* 战争时间轴：一条细轴 + 战争节点（保留"战争"这一层的入口） */
.strip {
  position: relative;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 8px 4px;
}
.strip::-webkit-scrollbar { display: none; }

.strip-item {
  position: relative;
  flex: none;
  width: 110px;
  padding: 0 5px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: center;
  color: inherit;
  z-index: 1;
}
/* 每项各画一段 1px 横线，拼接成贯通全宽的时间轴（可随横向滚动延展） */
.strip-item::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 35px;
  height: 1px;
  background: rgba(255, 255, 255, .19);
}
.strip-item:first-child::after { left: 50%; }
.strip-item:last-child::after { right: 50%; }

.st-name {
  display: block;
  height: 29px;
  font-size: 11px;
  line-height: 1.32;
  color: #a8a8a8;
  overflow: hidden;
  transition: color .18s;
}
.st-dot {
  display: block;
  width: 7px; height: 7px;
  margin: 3px auto 6px;
  border-radius: 50%;
  background: #5c5c5c;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--bg);
  transition: background .18s, transform .18s, border-color .18s;
}
.st-year {
  display: block;
  font-size: 10px;
  color: #7d7d7d;
  font-variant-numeric: tabular-nums;
  transition: color .18s;
}
.strip-item:hover .st-name { color: #fff; }
.strip-item:hover .st-dot { background: var(--red); transform: scale(1.5); }
.strip-item:hover .st-year { color: var(--txt-2); }
.strip-item.fic .st-dot { background: transparent; border: 1.5px solid #5c5c5c; }
.strip-item.fic:hover .st-dot { border-color: var(--red); }

/* 作品海报行 */
.row-wrap { position: relative; }

.row-track {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 22px 8px 14px;
}
.row-track::-webkit-scrollbar { display: none; }

.row-fade {
  position: absolute;
  top: 0; bottom: 0;
  width: 64px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s;
  z-index: 4;
}
.row-fade.l { left: 0; background: linear-gradient(90deg, var(--bg), rgba(20, 20, 20, 0)); }
.row-fade.r { right: 0; background: linear-gradient(270deg, var(--bg), rgba(20, 20, 20, 0)); }
.row-fade.on { opacity: 1; }

.row-nav {
  position: absolute;
  top: 0; bottom: 0;
  width: 56px;
  z-index: 5;
  border: 0;
  cursor: pointer;
  background: rgba(20, 20, 20, .58);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.row-wrap:hover .row-nav { opacity: 1; }
.row-nav:hover { background: rgba(20, 20, 20, .85); }
.row-nav.prev { left: 0; }
.row-nav.next { right: 0; }
.row-nav[hidden] { display: none; }

/* 海报卡片：默认只有海报，悬停时下方展开信息 */
.card {
  position: relative;
  flex: none;
  width: var(--card-w);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.card:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
.card { transition: opacity .22s; }

/* 时间轴节点悬停 / 定位某场战争时：突出该战争的作品，其余淡出 */
.row-track.focus .card { opacity: .28; }
.row-track.focus .card.hot { opacity: 1; }

.c-box {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 4px;
  overflow: hidden;
  background: #232323;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
  transform-origin: center bottom;
  transition: transform .28s cubic-bezier(.2, .7, .3, 1), box-shadow .28s;
}
.card:hover .c-box,
.card:focus-visible .c-box {
  transform: scale(1.07);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .78);
}

.c-img { width: 100%; height: 100%; object-fit: cover; }

/* 无海报时的占位封面 */
.c-ph {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px;
  text-align: center;
  background: linear-gradient(160deg, #2e2e2e, #1a1a1a);
}
.c-box.noimg .c-ph { display: flex; }
.c-ph span { font-size: 20px; opacity: .85; }
.c-ph b {
  font-size: 11px;
  font-weight: 600;
  color: var(--txt-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片信息：桌面端不参与布局，仅作为悬停浮层的内容源；窄屏（无悬停）改为常显 */
.c-info { display: none; }

/* 悬停浮层：position:fixed 脱离海报行的裁剪，能自由向下展开（网飞式悬停卡） */
.hcard {
  position: fixed;
  z-index: 70;
  background: var(--elev);
  border-radius: 4px;
  padding: 10px 12px 12px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .78), 0 0 0 1px rgba(255, 255, 255, .07);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .16s, transform .16s;
}
.hcard.on { opacity: 1; transform: none; }
.c-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.c-meta { font-size: 11px; color: var(--txt-3); margin-top: 4px; }
.c-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.c-war {
  font-size: 10.5px;
  color: var(--txt-4);
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 评分标签：保持无彩色，避免破坏整体单色基调 */
.r {
  font-style: normal;
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 3px;
  color: #ddd;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
 * 页脚
 * ============================================================ */
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding: 32px var(--pad-x) 46px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
  color: var(--txt-4);
}
.foot code {
  background: rgba(255, 255, 255, .08);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11.5px;
}
.foot-sep { color: #4a4a4a; }

/* ============================================================
 * 弹层（战争 / 作品详情）
 * ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(12px, 4vh, 52px) 16px;
}
.modal[hidden] { display: none; }
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .76);
}

.modal-card {
  position: relative;
  width: min(780px, 100%);
  background: var(--elev);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .82);
  animation: pop .3s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(20px) scale(.985); }
}

.x {
  position: absolute;
  top: 11px; right: 11px;
  z-index: 5;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(20, 20, 20, .74);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s;
}
.x:hover { background: rgba(20, 20, 20, .96); }

/* 弹层头图 */
.mh {
  position: relative;
  min-height: 246px;
  display: flex;
  align-items: flex-end;
  padding: 26px 28px 24px;
}
.mh-art {
  position: absolute;
  inset: 0;
  display: flex;
  overflow: hidden;
  filter: blur(17px) brightness(.72) saturate(1.3);
  transform: scale(1.18);
}
.mh-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--elev) 1%, rgba(24, 24, 24, .55) 46%, rgba(24, 24, 24, .38) 100%);
}
.mh-in {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 22px;
  width: 100%;
}
.mh-poster {
  flex: none;
  width: 132px;
  height: 198px;
  border-radius: 5px;
  overflow: hidden;
  background: #232323;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .72);
}
.mh-poster .c-box { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.mh-poster .c-box, .mh-poster:hover .c-box { transform: none; }
.mh-text { min-width: 0; padding-bottom: 3px; }
.mh-kicker { font-size: 11.5px; letter-spacing: 2px; color: #c9c9c9; }
.mh-title {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.3px;
  margin: 9px 0 13px;
  text-shadow: 0 3px 20px rgba(0, 0, 0, .6);
}
.mh-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mh-acts .btn { padding: 9px 20px; font-size: 14px; }

/* 弹层正文 */
.mb { padding: 4px 28px 30px; }
.mb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--txt-2);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.chip {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .11);
  color: #e5e5e5;
}
.chip.fic { background: rgba(229, 9, 20, .16); color: #ff6a70; }
.chiplink {
  background: none;
  border: 0;
  padding: 0;
  color: var(--txt-2);
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, .3);
  transition: color .18s, border-color .18s;
}
.chiplink:hover { color: #fff; border-bottom-color: #fff; }

.mb-desc {
  font-size: 14.5px;
  line-height: 1.85;
  color: #d2d2d2;
  margin-bottom: 24px;
}
.mb-sec {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 13px;
}
.mb-sec b { font-size: 12px; font-weight: 500; color: var(--txt-3); }

/* 战役：竖向时间轴 */
.tl {
  list-style: none;
  position: relative;
  padding-left: 22px;
  margin-bottom: 26px;
}
.tl::before {
  content: '';
  position: absolute;
  left: 5px; top: 7px; bottom: 7px;
  width: 1px;
  background: rgba(255, 255, 255, .16);
}
.tl li {
  position: relative;
  padding-bottom: 13px;
  font-size: 13px;
  color: #d2d2d2;
  line-height: 1.55;
}
.tl li::before {
  content: '';
  position: absolute;
  left: -21px; top: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #5c5c5c;
  box-shadow: 0 0 0 3px var(--elev);
  transition: background .18s;
}
.tl li:hover::before { background: var(--red); }
.tl-y {
  display: inline-block;
  min-width: 54px;
  color: var(--txt-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.tl-note { color: var(--txt-4); font-size: 11.5px; margin-left: 8px; }

/* 同系列作品横排 */
.rel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 6px;
}
.rel::-webkit-scrollbar { display: none; }
.rel-item {
  flex: none;
  width: 104px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.rel-item .c-box { width: 104px; height: 156px; transition: transform .2s, box-shadow .2s; }
.rel-item:hover .c-box { transform: scale(1.05); box-shadow: 0 12px 26px rgba(0, 0, 0, .7); }
.rel-name {
  font-size: 11.5px;
  color: var(--txt-2);
  margin-top: 7px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rel-item:hover .rel-name { color: #fff; }

/* 所属战争卡片 */
.war-card {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, .05);
  border: 0;
  border-left: 3px solid var(--red);
  border-radius: 6px;
  padding: 14px 16px;
  cursor: pointer;
  color: inherit;
  margin-bottom: 24px;
  transition: background .2s;
}
.war-card:hover { background: rgba(255, 255, 255, .09); }
.war-card b { display: block; font-size: 14px; color: #fff; margin-bottom: 5px; }
.war-card span { font-size: 12.5px; line-height: 1.7; color: var(--txt-2); }
.war-card em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  color: var(--txt-3);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
 * 手机端
 * ============================================================ */
@media (max-width: 900px) {
  .bb-poster { display: none; }
}

@media (max-width: 767px) {
  :root { --nav-h: 56px; }

  .nav-in { gap: 12px; }
  .nav-meta { display: none; }
  .nav-link { font-size: 12.5px; }

  .billboard { height: auto; min-height: 380px; padding-bottom: 8px; }
  .bb-in { padding-top: calc(var(--nav-h) + 34px); align-items: flex-start; }
  .bb-kicker { font-size: 11px; letter-spacing: 2.5px; }
  .bb-title { font-size: clamp(29px, 9vw, 40px); margin: 10px 0 12px; }
  .bb-sub { font-size: 13px; }
  .bb-brief { font-size: 13.5px; margin-bottom: 18px; }
  .btn { padding: 11px 20px; font-size: 14px; }
  .bb-facts { font-size: 11.5px; margin-top: 14px; }

  .rows { margin-top: -30px; }
  .era-head { padding: 0 6px 7px; }
  .era-count { display: none; }
  .era-range { font-size: 11px; }

  .strip { padding: 0 6px 2px; }
  .strip-item { width: 98px; }
  .st-name { font-size: 10.5px; }

  /* 手机无悬停：信息改为常显在卡片下方 */
  .row-track { gap: 9px; padding: 6px 6px 12px; }
  .row-nav, .row-fade { display: none; }
  :root { --card-w: 116px; --card-h: 174px; }
  .card:hover .c-box, .card:focus-visible .c-box { transform: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
  /* 触屏没有悬停：标题等信息直接常显在卡片下方 */
  .c-info { display: block; padding: 8px 0 0; }
  .c-title { font-size: 12px; -webkit-line-clamp: 2; }
  .c-meta { font-size: 10.5px; margin-top: 3px; }
  .c-badges { display: none; }
  .c-war { font-size: 10px; margin-top: 6px; padding-top: 6px; }

  .foot { padding: 26px var(--pad-x) 38px; font-size: 11.5px; }

  .modal { padding: 12px 10px 24px; }
  .mh { min-height: 200px; padding: 20px 18px 18px; }
  .mh-poster { width: 100px; height: 150px; }
  .mh-title { font-size: 20px; margin: 8px 0 10px; }
  .mh-acts .btn { padding: 8px 15px; font-size: 13px; }
  .mb { padding: 4px 18px 24px; }
  .mb-desc { font-size: 13.5px; }
  .tl-y { min-width: 48px; }
}

/* ============================================================
 * 动画降级
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .row-track { scroll-behavior: auto; }
  .modal-card { animation: none; }
  * { transition: none !important; }
}
.no-anim .modal-card { animation: none !important; }
.no-anim { scroll-behavior: auto; }
