/* ==========================================================================
   BORDER TASK — 极简黑底 / 影视化 Hero / 右侧常驻筛选
   参考 Epic 式的克制排版，但按钮和内容仍按本项目的下载流程。
   ========================================================================== */

:root {
  --bg: #101014;
  --bg-deep: #0c0c0f;
  --panel: #17171c;
  --panel-raised: #1c1c22;
  --text: #ffffff;
  --text-soft: #d3d3da;
  --muted: #96969f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --blue: #8fb9ff;
  --blue-soft: rgba(112, 160, 255, 0.12);
  --blue-line: rgba(143, 185, 255, 0.28);
  --font-sans: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "SimSun", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  color: #0a0a0d;
  background: #ffffff;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   极简顶栏
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 4.2rem;
  padding: 0 clamp(1.2rem, 4.5vw, 4.5rem);
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(16, 16, 20, 0.7), transparent);
  transition: background 0.3s ease, border-color 0.3s ease, height 0.3s ease;
}

.site-header.is-scrolled {
  height: 3.7rem;
  border-color: var(--line);
  background: rgba(16, 16, 20, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.16rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.brand::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--blue);
}

.brand span {
  color: var(--blue);
  letter-spacing: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  margin-left: auto;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

.header-nav a:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   全屏电影感 Hero
   -------------------------------------------------------------------------- */

main {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  padding: 9rem clamp(1.2rem, 4.5vw, 4.5rem) clamp(4rem, 8vh, 7rem);
  overflow: hidden;
  background: var(--bg-deep);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  opacity: 0.78;
  filter: saturate(0.82) contrast(1.05);
  transform: scale(1.015);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 16, 20, 0.92) 0%, rgba(16, 16, 20, 0.52) 44%, rgba(16, 16, 20, 0.12) 78%),
    linear-gradient(180deg, rgba(16, 16, 20, 0.32) 0%, transparent 26%, rgba(16, 16, 20, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.62rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text-soft);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.tag-blue {
  border-color: var(--blue-line);
  color: var(--blue);
  background: var(--blue-soft);
}

.hero h1 {
  max-width: 8.5em;
  font-size: clamp(4.2rem, 10vw, 9.6rem);
  font-weight: 900;
  line-height: 0.84;
  letter-spacing: -0.075em;
}

.hero h1 span {
  display: block;
}

.hero h1 em {
  display: inline-block;
  color: var(--blue);
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.08em;
}

.hero-sub {
  max-width: 35rem;
  margin-top: 1.5rem;
  color: var(--text-soft);
  font-size: clamp(0.95rem, 1.15vw, 1.06rem);
  line-height: 1.8;
}

.hero-desc {
  max-width: 37rem;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.9rem;
}

/* 全页唯一的下载按钮：纯白 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-width: 15.5rem;
  padding: 0.98rem 1.8rem;
  border: 0;
  border-radius: 6px;
  color: #0b0b0e;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary span {
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.btn-primary:hover {
  background: #e9e9ed;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.btn-primary:hover span {
  transform: translateY(2px);
}

.hero-link {
  color: var(--text-soft);
  font-size: 0.8rem;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.3em;
  transition: color 0.2s ease;
}

.hero-link:hover {
  color: var(--text);
}

.hero-meta {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.hero-meta b {
  color: var(--text-soft);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   通用区块
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(5.5rem, 9vw, 9rem) clamp(1.2rem, 4.5vw, 4.5rem);
}

.section-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.6rem;
}

.kicker {
  margin-bottom: 0.7rem;
  color: var(--blue);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.055em;
}

.section-head p {
  max-width: 29rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.85;
}

/* --------------------------------------------------------------------------
   游戏介绍卡片
   -------------------------------------------------------------------------- */

.overview {
  background: var(--bg);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.info-card {
  min-height: 15.5rem;
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.info-card:hover {
  border-color: var(--line-strong);
  background: var(--panel-raised);
  transform: translateY(-2px);
}

.info-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3.2rem;
}

.info-index {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.info-card h3 {
  margin-bottom: 0.7rem;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.info-card p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.85;
}

.info-card p b {
  color: var(--text-soft);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   版本区 + 右侧常驻筛选
   -------------------------------------------------------------------------- */

.library {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.library-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: start;
}

.library-head {
  margin-bottom: 2.2rem;
}

.library-head h2 {
  margin-bottom: 0.7rem;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.055em;
}

.library-head p {
  max-width: 38rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.85;
}

.version-list {
  display: grid;
  gap: 0.75rem;
}

.version-card {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr) auto;
  gap: 1.4rem;
  padding: 1.45rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.version-card:hover {
  border-color: var(--line-strong);
  background: var(--panel-raised);
  transform: translateY(-1px);
}

.version-card.is-current {
  border-color: var(--blue-line);
}

.version-card.is-hidden {
  display: none;
}

.version-date {
  padding-top: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.version-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}

.version-title-row h3 {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.version-badge {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--blue-line);
  border-radius: 3px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.version-card h4 {
  margin-bottom: 0.45rem;
  color: var(--text-soft);
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
}

.version-card p {
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.8;
}

.is-current p {
  color: var(--text-soft);
}

.version-size {
  padding-top: 0.12rem;
  color: var(--muted);
  font-size: 0.69rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.library-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.8;
}

.library-note a {
  color: var(--blue);
  text-underline-offset: 0.2em;
}

/* 右侧筛选面板 */
.filter-panel {
  position: sticky;
  top: 5.4rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.filter-head span:last-child {
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.filter-panel h3 {
  margin: 1.3rem 0 0.65rem;
  color: var(--text-soft);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-chip {
  width: 100%;
  padding: 0.62rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-family: inherit;
  font-size: 0.76rem;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter-chip:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.filter-chip.is-active {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
}

.filter-meta {
  margin-top: 1.3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.filter-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.9;
}

.filter-meta-row b {
  color: var(--text-soft);
  font-weight: 700;
}

.filter-note {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   怎么开始
   -------------------------------------------------------------------------- */

.start {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.start-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.start-layout h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.055em;
}

.start-layout > div > p {
  max-width: 26rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.85;
}

.steps {
  display: grid;
  gap: 1.3rem;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  gap: 0.9rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.8;
}

.steps li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  counter-increment: step;
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 800;
}

.steps b {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--text);
  font-weight: 700;
}

.steps code {
  color: var(--text-soft);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1.2rem, 4.5vw, 4.5rem) 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.02em;
}

.site-footer strong {
  color: var(--text);
  letter-spacing: 0.14em;
}

.site-footer a {
  color: var(--muted);
  text-underline-offset: 0.2em;
}

/* --------------------------------------------------------------------------
   进入动画
   -------------------------------------------------------------------------- */

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

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

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

@media (max-width: 1050px) {
  .header-nav {
    display: none;
  }

  .library-layout {
    grid-template-columns: minmax(0, 1fr) 16rem;
    gap: 2rem;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .info-card {
    min-height: auto;
  }

  .info-top {
    margin-bottom: 1.6rem;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: 92svh;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(16, 16, 20, 0.9) 0%, rgba(16, 16, 20, 0.5) 100%),
      linear-gradient(180deg, rgba(16, 16, 20, 0.2), rgba(16, 16, 20, 0.92));
  }

  .library-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    order: -1;
  }

  .start-layout {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }

  .version-card {
    grid-template-columns: 1fr auto;
    gap: 0.55rem 1rem;
  }

  .version-date {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .version-size {
    grid-column: 2;
    grid-row: 2;
  }

  .version-card > div:nth-child(2) {
    grid-column: 1;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 7.2rem 1rem 3.5rem;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 17vw, 5.2rem);
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .btn-primary {
    width: 100%;
    min-width: 0;
  }

  .section,
  .site-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .version-card {
    padding: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .info-card,
  .version-card,
  .btn-primary,
  .hero-bg {
    transition: none;
  }
}
