/* =========================================================
   2025 年度电影榜单 · 仿制设计稿
   背景全部为静态图片（img/ 目录），不含任何视频元素。
   ========================================================= */

:root {
  --bg: #0b100e;
  --bg-soft: #131a17;
  --ink: #f2efe6;
  --ink-2: rgba(242, 239, 230, .72);
  --ink-3: rgba(242, 239, 230, .46);
  --line: rgba(242, 239, 230, .14);
  --green: #4fd07a;
  --green-deep: #2f9c5f;
  --amber: #ffb454;
  --red: #ff6a45;

  --rail-gap: 22px;
  --card-w: 208px;
  --radius: 14px;
  --topbar-h: 64px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-num: "Bebas Neue", "Oswald", "Helvetica Neue", Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

::selection {
  background: var(--green);
  color: #08120c;
}

/* ---------------- 顶部工具条 ---------------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(6, 9, 8, .85), rgba(6, 9, 8, 0));
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.topbar > * { pointer-events: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__text b {
  font-size: 14px;
  letter-spacing: .12em;
}

.brand__text i {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .32em;
  color: var(--green);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__now {
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--ink-3);
  max-width: 34vw;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.menu-btn:hover {
  border-color: rgba(79, 208, 122, .6);
  background: rgba(79, 208, 122, .12);
}

.menu-btn__bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.menu-btn__bars i {
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

.menu-btn__label {
  font-size: 12px;
  letter-spacing: .16em;
}

.menu-btn[aria-expanded="true"] .menu-btn__bars i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__bars i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------------- 阅读进度 ---------------- */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 70;
  height: 2px;
  background: rgba(255, 255, 255, .07);
}

.progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green-deep), var(--green), var(--amber));
  transition: width .18s linear;
}

/* ---------------- 目录浮层 ---------------- */

.catalog {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 7, .9);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .38s var(--ease), visibility .38s var(--ease);
}

.catalog.is-open {
  opacity: 1;
  visibility: visible;
}

.catalog__inner {
  width: min(920px, 88vw);
  max-height: 76vh;
  overflow-y: auto;
  padding: 8px 4px;
}

.catalog__title {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: .38em;
  color: var(--ink-3);
}

.catalog__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 4px 28px;
}

.catalog__item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease);
}

.catalog__item:hover {
  background: rgba(255, 255, 255, .06);
}

.catalog__item.is-active { color: var(--green); }

.catalog__num {
  font-family: var(--font-num);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--ink-3);
  min-width: 22px;
}

.catalog__item.is-active .catalog__num { color: var(--green); }

.catalog__name {
  font-size: 16px;
  letter-spacing: .04em;
}

.catalog__foot {
  margin: 22px 12px 4px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .1em;
}

/* ---------------- 右侧圆点导航 ---------------- */

.dots {
  position: fixed;
  right: clamp(10px, 2vw, 26px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: grid;
  gap: 10px;
  padding: 12px 8px;
}

.dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(242, 239, 230, .28);
  cursor: pointer;
  transition: background .3s var(--ease), transform .3s var(--ease);
}

.dot:hover { background: rgba(242, 239, 230, .7); }

.dot.is-active {
  background: var(--green);
  transform: scale(1.5);
}

.dot__tip {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translate(6px, -50%);
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(10, 14, 12, .92);
  border: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .1em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}

.dot:hover .dot__tip {
  opacity: 1;
  transform: translate(0, -50%);
}

/* ---------------- 翻页容器 ---------------- */

.deck {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.deck::-webkit-scrollbar { display: none; }

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--topbar-h) + 24px) clamp(18px, 5vw, 72px) 72px;
}

/* 静态背景图（替代原设计中的背景视频） */
.page__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.06);
  transition: transform 1.4s var(--ease), opacity 1.2s var(--ease);
  opacity: .92;
  z-index: 0;
}

.page.is-visible .page__bg { transform: scale(1); }

.page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(5, 8, 7, .1), rgba(5, 8, 7, .78)),
    linear-gradient(180deg, rgba(5, 8, 7, .55), rgba(5, 8, 7, .2) 40%, rgba(5, 8, 7, .8));
  pointer-events: none;
}

.page__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------------- 封面 ---------------- */

.page--cover { text-align: center; }

.cover { display: grid; justify-items: center; gap: 6px; }

.cover__kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: .42em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.cover__year {
  margin: 10px 0 0;
  display: flex;
  gap: clamp(4px, 1.2vw, 16px);
  font-family: var(--font-num);
  font-size: clamp(84px, 19vw, 240px);
  font-weight: 700;
  line-height: .88;
  letter-spacing: .02em;
}

.cover__year span {
  display: inline-block;
  background: linear-gradient(180deg, #fffdf6 12%, var(--green) 62%, var(--green-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise .9s var(--ease) both;
}

.cover__year span:nth-child(1) { animation-delay: .05s; }
.cover__year span:nth-child(2) { animation-delay: .16s; }
.cover__year span:nth-child(3) { animation-delay: .27s; }
.cover__year span:nth-child(4) { animation-delay: .38s; }

.cover__theme {
  margin: 14px 0 0;
  font-size: clamp(26px, 4.4vw, 52px);
  font-weight: 600;
  letter-spacing: .3em;
  text-indent: .3em;
  animation: rise .9s .5s var(--ease) both;
}

.cover__desc {
  margin: 20px 0 0;
  max-width: 34em;
  color: var(--ink-2);
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 2;
  animation: rise .9s .62s var(--ease) both;
}

.cover__meta {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--ink-3);
  animation: rise .9s .74s var(--ease) both;
}

.cover__meta em {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--green);
  opacity: .7;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: .28em;
  color: var(--ink-3);
}

.scroll-hint__arrow {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--green), transparent);
  animation: drop 1.9s var(--ease) infinite;
}

/* ---------------- 主题页 ---------------- */

.theme {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
}

.theme__frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
  border: 1px solid var(--line);
}

.theme__img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
}

.theme__frame-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(8, 12, 10, .8);
  border: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--ink-3);
}

.theme__title {
  margin: 0 0 22px;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: .06em;
}

.theme__p {
  margin: 0 0 16px;
  max-width: 40em;
  color: var(--ink-2);
  line-height: 2.05;
}

.theme__sign {
  margin: 26px 0 0;
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--green);
}

/* ---------------- 榜单分区 ---------------- */

.chart__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(22px, 3vw, 40px);
}

.chart__eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 12px;
  border: 1px solid rgba(79, 208, 122, .45);
  border-radius: 999px;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--green);
}

.chart__title {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: .05em;
  line-height: 1.25;
}

.chart__desc {
  margin: 12px 0 0;
  color: var(--ink-3);
  font-size: 14px;
  letter-spacing: .06em;
}

.chart__nav {
  display: flex;
  gap: 10px;
}

.arrow {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease), opacity .3s var(--ease);
}

.arrow:hover:not(:disabled) {
  border-color: rgba(79, 208, 122, .6);
  background: rgba(79, 208, 122, .14);
}

.arrow:disabled {
  opacity: .3;
  cursor: default;
}

.arrow svg { width: 16px; height: 16px; }

/* 横向片单轨道 */
.rail {
  display: flex;
  gap: var(--rail-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: 6px 2px 26px;
  margin: 0 -2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 239, 230, .24) transparent;
}

.rail::-webkit-scrollbar { height: 4px; }
.rail::-webkit-scrollbar-track { background: rgba(255, 255, 255, .05); border-radius: 999px; }
.rail::-webkit-scrollbar-thumb { background: rgba(242, 239, 230, .26); border-radius: 999px; }
.rail::-webkit-scrollbar-thumb:hover { background: rgba(79, 208, 122, .6); }

.rail.is-dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
  cursor: grabbing;
}

.rail.is-dragging .card { pointer-events: none; }

/* ---------------- 影片卡片 ---------------- */

.card {
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  scroll-snap-align: start;
  display: block;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.page.is-visible .card {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 70ms);
}

.card__poster {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .5);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}

.card__img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.card:hover .card__poster {
  transform: translateY(-8px);
  border-color: rgba(79, 208, 122, .5);
  box-shadow: 0 26px 54px rgba(0, 0, 0, .62);
}

.card:hover .card__img { transform: scale(1.05); }

.card__rank {
  position: absolute;
  left: 10px;
  top: 10px;
  min-width: 34px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(8, 12, 10, .78);
  backdrop-filter: blur(4px);
  border: 1px solid var(--line);
  font-family: var(--font-num);
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  letter-spacing: .06em;
}

.card--top .card__rank {
  background: linear-gradient(140deg, var(--amber), var(--red));
  border-color: transparent;
  color: #1a0e06;
  font-weight: 700;
}

.card__score {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(8, 12, 10, .82);
  backdrop-filter: blur(4px);
  border: 1px solid var(--line);
}

.card__score b {
  font-family: var(--font-num);
  font-size: 17px;
  color: var(--green);
  letter-spacing: .04em;
}

.card__score span {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: .1em;
}

.card__tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px dashed rgba(255, 180, 84, .6);
  background: rgba(20, 14, 6, .7);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--amber);
}

.card__tag--pick {
  border: 1px solid transparent;
  background: linear-gradient(140deg, var(--green), var(--green-deep));
  color: #06170e;
  font-weight: 600;
}

.card__body { padding: 14px 2px 0; }

.card__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .3s var(--ease);
}

.card:hover .card__name { color: var(--green); }

.card__stars {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 8px;
}

.card__stars i {
  width: 11px;
  height: 11px;
  background: rgba(242, 239, 230, .2);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.card__stars i.on { background: var(--amber); }
.card__stars i.half {
  background: linear-gradient(90deg, var(--amber) 50%, rgba(242, 239, 230, .2) 50%);
}

.card__meta {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------- 结尾页 ---------------- */

.page--end { text-align: center; }

.end { display: grid; justify-items: center; }

.end__title {
  margin: 0;
  font-size: clamp(26px, 4.4vw, 52px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .1em;
}

.end__desc {
  margin: 22px 0 0;
  color: var(--ink-2);
  line-height: 2;
  font-size: 14px;
}

.end__actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 12px 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: .16em;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 208, 122, .6);
  background: rgba(79, 208, 122, .14);
}

.btn--primary {
  background: linear-gradient(140deg, var(--green), var(--green-deep));
  border-color: transparent;
  color: #06170e;
  font-weight: 600;
}

.btn--primary:hover { background: linear-gradient(140deg, #6ee79a, #37a86a); }

.end__cards {
  margin-top: 44px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  text-align: left;
}

.mini img { border-radius: 999px; }

.mini b {
  display: block;
  font-size: 14px;
  letter-spacing: .06em;
}

.mini span {
  font-size: 12px;
  color: var(--ink-3);
}

.end__foot {
  margin-top: 46px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 46em;
}

.end__foot p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.9;
}

.end__foot code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .07);
  font-size: 11px;
}

/* ---------------- 分区进场动画 ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.page.is-visible .reveal {
  opacity: 1;
  transform: none;
}

.page.is-visible .reveal--d1 { transition-delay: .1s; }
.page.is-visible .reveal--d2 { transition-delay: .2s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(34px); }
  to { opacity: 1; transform: none; }
}

@keyframes drop {
  0% { opacity: 0; transform: translateY(-10px) scaleY(.5); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px) scaleY(1); }
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1024px) {
  :root { --card-w: 178px; }
  .dots { display: none; }
}

@media (max-width: 720px) {
  :root {
    --card-w: 148px;
    --rail-gap: 14px;
    --topbar-h: 56px;
  }

  body { font-size: 15px; }

  .topbar__now { display: none; }
  .menu-btn__label { display: none; }
  .menu-btn { padding: 9px 12px; }

  .page {
    align-items: flex-start;
    padding-top: calc(var(--topbar-h) + 40px);
  }

  .theme {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .theme__frame { width: min(200px, 52vw); }

  .chart__nav { display: none; }

  .catalog__list { grid-template-columns: 1fr 1fr; gap: 2px 8px; }
  .catalog__name { font-size: 14px; }

  .end__cards { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .deck, .rail { scroll-behavior: auto; }
}
