/* ========== Global Reset / Base ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  color: #222;
  background-color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: 90%;
  max-width: 1200px;
  margin-inline: auto;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.btn--primary {
  background-color: #0066ff;
  color: #fff;
}

.btn--primary:hover {
  background-color: #0050cc;
}

.btn--secondary {
  background-color: #eee;
  color: #222;
}

.btn--secondary:hover {
  background-color: #ddd;
}

.btn--ghost {
  background-color: transparent;
  border: 1px solid #ccc;
  color: #222;
}

.btn--ghost:hover {
  border-color: #666;
}

.btn--sm {
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
}

/* ========== Header ========== */
.site-header {
  background-color: #111;
  color: #fff;
  padding: 0.8rem 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.primary-nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: #fff;
  font-weight: 500;
}

.primary-nav a:hover {
  text-decoration: underline;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  color: #fff;
  background: #000;
  text-align: center;
  padding: 4rem 1rem;
}

.hero__media video,
.hero__media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero__content {
  position: relative;
  z-index: 1;
  margin-top: -40%;
}

.hero__title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero__subtitle {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

/* ========== Sections ========== */
.section {
  padding: 3rem 0;
}

.section--alt {
  background-color: #f8f9fa;
}

.section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section__header h2 {
  font-size: 1.6rem;
  margin: 0;
}

.section__more {
  font-size: 0.9rem;
  color: #0066ff;
}

.section__more:hover {
  text-decoration: underline;
}

/* ========== Cards / Grids ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.game-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.game-card:hover {
  transform: translateY(-4px);
}

.game-card__body {
  padding: 1rem;
}

.game-card__title {
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
}

.game-card__meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.6rem;
}

.tag-list {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag {
  background: #eee;
  border-radius: 12px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
}

/* ========== News Cards ========== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.news-card__body {
  padding: 1rem;
}

.news-card__title {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.news-card__excerpt {
  font-size: 0.9rem;
  color: #555;
}

.news-card__date {
  font-size: 0.8rem;
  color: #888;
}

/* ========== Footer ========== */
.site-footer {
  background-color: #111;
  color: #ccc;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.footer__top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer__title {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__list li {
  margin-bottom: 0.4rem;
}

.footer__list a {
  color: #ccc;
}

.footer__list a:hover {
  color: #fff;
}

.footer__bottom {
  border-top: 1px solid #333;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.community-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.panel {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.panel__title {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.panel__desc {
  flex: 1;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
}

.panel .btn {
  align-self: start;
}

/* === Vertical timeline look for #releases === */
.timeline {
  position: relative;
  margin-top: 1rem;
  padding-left: 1.25rem;            /* space for the vertical line + dots */
  display: grid;
  gap: 1rem;
}

/* vertical line */
.timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;                     /* align with dots */
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e6e8eb;
}

/* each item as a light card */
.timeline__item {
  position: relative;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1rem 1rem 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

/* dot on the line */
.timeline__item::before {
  content: "";
  position: absolute;
  left: -0.95rem;                    /* centers the dot on the line */
  top: 1.2rem;                       /* roughly aligns with the title */
  width: 12px;
  height: 12px;
  background: #0066ff;               /* primary color */
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #e6e8eb;     /* ring merging into the line */
}

/* title / date / desc */
.timeline__title {
  margin: 0 0 .25rem;
  font-size: 1.1rem;
}

.timeline__date {
  display: inline-block;
  margin: 0 0 .5rem;
  font-size: .9rem;
  color: #6b7280;
  background: #f3f4f6;               /* subtle pill */
  padding: .15rem .5rem;
  border-radius: 999px;
}

.timeline__desc {
  margin: 0;
  color: #444;
}

/* spacing tune on wider screens */
@media (min-width: 900px) {
  .timeline { padding-left: 1.75rem; }
  .timeline::before { left: 0.9rem; }
  .timeline__item::before { left: -1.3rem; }
}

/* OPTIONAL: switch to a two-column card grid by adding .timeline--grid to the container */
.timeline--grid {
  padding-left: 0;
}
.timeline--grid::before,
.timeline--grid .timeline__item::before { display: none; }
.timeline--grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* === Support cards grid === */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.support-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.support-card__title {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: #111;
}

.support-card__desc {
  flex: 1;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
}

.support-card .btn {
  align-self: start;
}

/* ===== Top bar polish ===== */

/* 1) Skip link：默认隐藏，聚焦时显示在左上角 */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  background: #111;
  color: #fff;
  padding: .5rem .75rem;
  border-radius: 6px;
  transform: translateY(-150%);
  transition: transform .15s ease;
  z-index: 1000;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid #fff;
}

/* 2) Header 容器与布局 */
.site-header {
  position: sticky;      /* 滚动时固定在顶部 */
  top: 0;
  z-index: 999;
  background: #111;
  color: #fff;
  border-bottom: 1px solid #1f1f1f;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
}

/* 品牌区域避免被压缩 */
.brand { display: inline-flex; align-items: center; gap: .5rem; flex: 0 0 auto; }

/* 3) 主导航（桌面） */
.primary-nav { flex: 1 1 auto; }
.nav-menu {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu > li > a {
  display: inline-block;
  padding: .5rem .25rem;
  color: #dcdcdc;
  font-weight: 600;
  border-radius: 6px;
}
.nav-menu > li > a:hover,
.nav-menu > li > a:focus {
  color: #fff;
  background: rgba(255,255,255,.08);
  outline: none;
}

/* 4) 汉堡按钮：桌面隐藏，移动端显示 */
.nav-toggle {
  display: none;                 /* > breakpoint 隐藏 */
  align-items: center;
  justify-content: center;
  width: 44px; height: 36px;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 0;
  cursor: pointer;
}
.nav-toggle:hover,
.nav-toggle:focus { background: rgba(255,255,255,.14); outline: none; }

/* 简易汉堡图标（用伪元素绘制，如果你没放 SVG） */
.nav-toggle::before, .nav-toggle::after, .nav-toggle span::before {
  content: ""; display: block; width: 22px; height: 2px; background: currentColor; margin: 4px auto;
}
.nav-toggle span { display: block; height: 0; }

/* 5) 右侧 CTA 区域 */
.header-ctas { display: flex; gap: .5rem; flex: 0 0 auto; }
.header-ctas .btn { padding: .5rem .9rem; border-radius: 8px; }
.header-ctas .btn--secondary { background: #e6e6e6; color: #111; }
.header-ctas .btn--secondary:hover { background: #d9d9d9; }

/* 6) 响应式：<= 960px 启用抽屉式导航 */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav { flex: 0 0 auto; }

  /* 折叠前隐藏菜单 */
  .nav-menu {
    position: absolute;
    left: 0; right: 0;
    top: 60px;                 /* 与 header 高度一致 */
    background: #111;
    border-top: 1px solid #1f1f1f;
    box-shadow: 0 12px 18px rgba(0,0,0,.25);
    flex-direction: column;
    gap: 0;
    padding: .5rem;
    display: none;             /* 默认关闭 */
  }
  .nav-menu > li > a { padding: .9rem 1rem; border-radius: 8px; }

  /* 打开状态 */
  .nav-menu.is-open { display: flex; }

  /* 让品牌在左，CTA 在右，中间是 toggle */
  .header__inner { gap: .5rem; }
}

/* 7) 焦点可见性（a / button） */
a:focus-visible, button:focus-visible {
  outline: 2px solid #6aa6ff;
  outline-offset: 2px;
  border-radius: 6px;
}

/* ===== Hero polish ===== */
.hero {
  position: relative;
  color: #fff;
  background: #000;
  overflow: hidden;
}

/* 让首屏更稳定的高度与居中排版 */
.hero .container {
  min-height: clamp(420px, 70vh, 880px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1rem;
}

.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media video,
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.35) 40%,
    rgba(0,0,0,.20) 100%
  );
  pointer-events: none;
}

.hero__content { position: relative; z-index: 1; max-width: 820px; margin-inline: auto; }

.hero__title {
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 3.2vw + 1rem, 3.5rem);
  letter-spacing: .2px;
  font-weight: 800;
}
.hero__subtitle {
  margin: 0 0 1.25rem;
  font-size: clamp(1rem, .6vw + .9rem, 1.25rem);
  color: #e8e8e8;
}

.hero__ctas {
  display: inline-flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.hero__ctas .btn { border-radius: 10px; padding: .7rem 1.1rem; }
.hero__ctas .btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
}
.hero__ctas .btn--ghost:hover { border-color: rgba(255,255,255,.6); }

/* 平台徽章：单行、无圆点、淡色 */
.platform-badges {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: .5rem 0 0;
  opacity: .9;
}
.platform-badges li,
.platform-badges img { height: 28px; }
.platform-badges img { width: auto; filter: brightness(100%); }

@media (max-width: 520px) {
  .hero .container { padding: 3rem 1rem; }
  .hero__ctas { flex-direction: column; align-items: center; }
  .hero__ctas .btn { width: 100%; max-width: 320px; }
}

