:root {
  --bg: #0e1620;
  --bg-2: #1b2838;
  --surface: #16202d;
  --surface-2: #1f2f42;
  --line: rgba(103, 193, 244, .16);
  --text: #c7d5e0;
  --text-dim: #8f98a0;
  --heading: #e6eef5;
  --accent: #66c0f4;
  --accent-deep: #2a5f8a;
  --green: #a1d343;
  --green-deep: #4c6b22;
  --radius: 4px;
  --container: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; display: block; }

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #081018; padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #171a21, #1b2838);
  border-bottom: 1px solid rgba(0,0,0,.5);
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.topbar-inner {
  display: flex; align-items: center; gap: 28px;
  min-height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--heading);
  margin-right: auto;
}
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-deep), #171a21);
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 700; font-size: 18px;
  border-radius: var(--radius);
}
.brand-text { font-weight: 700; font-size: 17px; line-height: 1.15; display: flex; flex-direction: column; }
.brand-text em { font-style: normal; font-size: 10px; letter-spacing: .28em; color: var(--text-dim); font-weight: 500; }

.nav { display: flex; gap: 22px; }
.nav a {
  color: #b8c7d3; text-decoration: none; font-size: 14px; padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { color: #fff; border-bottom-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
  transition: filter .15s ease, transform .15s ease;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.15); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-steam {
  background: linear-gradient(180deg, #47bfff 0%, #1a44c7 120%);
  color: #fff; padding: 8px 16px;
}
.btn-primary {
  background: linear-gradient(180deg, #257c9d, #1b4f72 130%);
  color: #d2ebf9;
  border-color: #4b9bc3;
}
.btn-ghost {
  background: rgba(103,193,244,.08);
  color: var(--accent);
  border-color: var(--line);
}
.btn-buy {
  background: linear-gradient(180deg, var(--green), var(--green-deep));
  color: #d9f1a5;
  padding: 6px 16px;
}

.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg {
  position: absolute; inset: 0;
  background: url("assets/hero-banner.png") center 30% / cover no-repeat;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14,22,32,.45) 0%, rgba(14,22,32,.78) 68%, var(--bg) 100%),
    linear-gradient(90deg, rgba(14,22,32,.85) 0%, rgba(14,22,32,.25) 55%, transparent 80%);
}
.hero-inner {
  position: relative;
  padding: clamp(88px, 14vh, 150px) 0 64px;
  max-width: 720px;
  margin-left: max(24px, calc((100vw - var(--container)) / 2));
}
.hero-kicker { margin: 0 0 14px; font-size: 13px; letter-spacing: .3em; color: var(--accent); }
.hero-title {
  margin: 0;
  font-size: clamp(40px, 6.5vw, 68px);
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,.6);
  font-weight: 800;
}
.hero-title-en {
  display: block; font-size: .38em; font-weight: 400; letter-spacing: .18em;
  color: var(--text); margin-top: 10px;
}
.hero-desc { margin: 22px 0 30px; font-size: 17px; max-width: 560px; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 12px 44px;
  margin: 44px 0 0; padding: 20px 0 0;
  border-top: 1px solid var(--line);
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats dt { font-size: 12px; letter-spacing: .12em; color: var(--text-dim); text-transform: uppercase; }
.hero-stats dd { margin: 2px 0 0; font-size: 22px; font-weight: 700; color: var(--heading); }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-2); border-block: 1px var(--line) solid; }
.section-head {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  margin-bottom: 34px;
}
.section-head h2, .studio-grid h2, .contact-inner h2 {
  font-size: 28px; color: var(--heading); margin: 0;
  padding-left: 14px; border-left: 4px solid var(--accent);
}
.section-head p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* ---------- game capsules (steam style) ---------- */
.capsule-list { display: flex; flex-direction: column; gap: 26px; }

.capsule {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.capsule:hover {
  transform: translateY(-3px);
  border-color: rgba(103,193,244,.45);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
}
.capsule-media { position: relative; aspect-ratio: 460 / 215; }
.capsule-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.capsule-soon .capsule-media::after {
  content: "开发中";
  position: absolute; top: 14px; left: 14px;
  background: rgba(8,16,24,.78); color: var(--accent);
  border: 1px solid var(--line);
  font-size: 12px; padding: 4px 10px; border-radius: 2px;
  letter-spacing: .1em;
}

.capsule-body {
  padding: 14px 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.capsule-body h3 { margin: 0; font-size: 22px; color: #fff; }
.title-en { font-size: 13px; font-weight: 400; color: var(--text-dim); letter-spacing: .08em; margin-left: 6px; }
.capsule-desc {
  margin: 0; font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.tags li {
  font-size: 12px; color: #9ec5e8;
  background: rgba(103,193,244,.1);
  border: 1px solid var(--line);
  padding: 3px 10px; border-radius: 2px;
}

.capsule-meta {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-top: 10px; border-top: 1px solid var(--line);
}
.capsule-cta { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.release { font-size: 13px; color: var(--text-dim); }
.price {
  font-size: 15px; font-weight: 700; color: var(--green);
  background: rgba(0,0,0,.4);
  border: 1px solid var(--green-deep);
  padding: 3px 12px; border-radius: 2px; white-space: nowrap;
}
.price.soon { color: var(--accent); border-color: var(--accent-deep); }

/* ---------- videos (bilibili) ---------- */
.video-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; align-items: start; }
.video-feature { margin: 0; min-width: 0; }
.video-player {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: #000; border: 1px solid var(--line); border-radius: var(--radius);
}
.video-frame, .video-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-play {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px;
  display: grid; place-items: center; padding: 0 0 0 4px;
  background: rgba(8,16,24,.72); color: var(--accent);
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.video-play:hover { background: rgba(103,193,244,.28); transform: scale(1.06); }
.video-play:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.video-duration {
  position: absolute; right: 10px; bottom: 10px; padding: 2px 8px;
  font-size: 12px; color: #cfe3f2; background: rgba(8,16,24,.82);
  border: 1px solid var(--line); border-radius: 2px;
}
.video-caption { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.video-caption-title { font-size: 17px; font-weight: 600; color: #fff; text-decoration: none; }
.video-caption-title:hover { color: var(--accent); text-decoration: underline; }
.video-caption-meta { font-size: 13px; color: var(--text-dim); }

.video-list {
  list-style: none; margin: 0; padding: 4px;
  max-height: 452px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  scrollbar-width: thin; scrollbar-color: var(--accent-deep) transparent;
}
.video-item + .video-item { border-top: 1px solid rgba(255,255,255,.05); }
.video-item button {
  width: 100%; display: grid; gap: 2px; padding: 9px 12px;
  background: none; border: 0; cursor: pointer; font: inherit; text-align: left;
}
.video-item button:hover { background: rgba(103,193,244,.08); }
.video-item button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.video-item button[aria-current="true"] { background: rgba(103,193,244,.16); }
.video-item-title { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-item button[aria-current="true"] .video-item-title { color: #fff; font-weight: 600; }
.video-item-meta { font-size: 12px; color: var(--text-dim); }
.video-more { margin: 22px 0 0; font-size: 14px; }
.video-more a { color: var(--accent); text-decoration: none; }
.video-more a:hover { text-decoration: underline; }

/* ---------- studio ---------- */
.studio-grid {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 48px; align-items: start;
}
.studio-grid h2 { margin-bottom: 20px; }
.studio-grid p { margin: 0 0 16px; max-width: 60ch; }
.studio-facts { margin: 0; display: grid; gap: 18px; }
.studio-facts div { border-left: 2px solid var(--line); padding-left: 16px; }
.studio-facts dt { font-size: 12px; letter-spacing: .14em; color: var(--text-dim); }
.studio-facts dd { margin: 2px 0 0; color: var(--heading); font-weight: 600; }

/* ---------- contact ---------- */
.contact-inner { text-align: center; max-width: 620px; }
.contact-inner h2 { display: inline-block; border-left: none; padding-left: 0; border-bottom: 4px solid var(--accent); padding-bottom: 6px; }
.contact-inner p { margin: 18px 0 26px; }
.contact-links { list-style: none; padding: 0; margin: 22px 0 0; }
.contact-links a { color: var(--accent); text-decoration: none; font-size: 14px; }
.contact-links a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.footer { background: #171a21; border-top: 1px solid rgba(0,0,0,.6); padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-dim); }
.footer p { margin: 0; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { color: var(--text-dim); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .capsule { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle {
    display: grid; place-items: center;
    width: 40px; height: 40px; margin-left: auto;
    background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
    cursor: pointer;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 18px; height: 2px; background: var(--accent); position: relative;
  }
  .nav-toggle span::before { position: absolute; top: -6px; }
  .nav-toggle span::after { position: absolute; top: 6px; }
  .topbar-inner .btn-steam { display: none; }
  .mobile-nav { display: grid; padding: 6px 24px 16px; border-top: 1px solid var(--line); }
  .mobile-nav a { color: #b8c7d3; text-decoration: none; padding: 10px 4px; border-bottom: 1px solid rgba(255,255,255,.04); }
  .mobile-nav[hidden] { display: none; }

  .hero-inner { margin-left: auto; }
  .capsule { grid-template-columns: 1fr; }
  .capsule-media { width: 100%; max-width: 460px; margin-inline: auto; }
  .video-layout { grid-template-columns: 1fr; }
  .video-list { max-height: 320px; }
  .capsule-meta { display: block; }
  .capsule-cta { margin-left: 0; margin-top: 10px; justify-content: space-between; }
  .studio-grid { grid-template-columns: 1fr; gap: 32px; }
}
