/* ============================================================
   乒乓世界 · 首页样式
   ------------------------------------------------------------
   视觉基调参考 rockstargames.com：
     · 首屏全屏铺满，信息密度极低
     · 超大标题 + 强明暗对比
     · 导航从透明渐变为实体
   内页会另写样式表，走「数据可读性优先」的路线，与首页区分。
   ============================================================ */

/* ============================================================
   顶部导航
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

/* 滚动后变实体（类名由 JS 添加） */
.nav.is-solid {
  background: rgba(8, 8, 10, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
}

.nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--sp-5);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

/* 品牌图标：一个抽象化的乒乓球 */
.nav__logo {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 28%,
    #fff 0%,
    #ffd9c2 18%,
    var(--brand) 62%,
    #a33000 100%
  );
  box-shadow: 0 0 18px var(--brand-glow);
  flex-shrink: 0;
}

/* 球体高光，让它看起来是立体的 */
.nav__logo::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 24%;
  width: 26%;
  height: 20%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  filter: blur(1.5px);
}

.nav__title {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.nav__title em {
  font-style: normal;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--text-2);
}

/* 六个入口居中：避开首屏右侧球员头部，左侧品牌与右侧汉堡按钮各自靠边 */
.nav__links {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  transform: translateX(-50%);
}

.nav__links a {
  position: relative;
  font-size: 14px;
  color: var(--text-1);
  transition: color var(--dur) var(--ease);
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text-0);
}

.nav__links a:hover::after,
.nav__links a.is-active::after {
  transform: scaleX(1);
}

/* 汉堡按钮（仅移动端显示） */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--text-0);
  transition: transform var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   首屏视觉区
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

/* --- 照片区：右侧竖版容器 ---
   竖构图照片放进竖版容器只裁约 20%；若全屏铺满则要裁掉 60%，
   人物会被裁成"大头照"、文字还会压脸。 */
.hero__bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 44%;
  z-index: -3;
  background: var(--bg-0);
  /* 左边缘渐隐，避免照片与文字区之间出现硬边 */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 22%,
    #000 100%
  );
  mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 100%);
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
  /* 尺寸/焦点由 JS 按球员注入：默认 cover 铺满裁切，个别照片可用 --size 覆盖成完整显示 */
  background-size: var(--size, cover);
  background-position: var(--focal, center 22%);
  background-repeat: no-repeat;
  /* 照片未到位时的兜底视觉：球员专属色调的主光 + 青色辅光 + 深底
     （--tone 由 JS 按球员注入，换人即换色） */
  background-image: radial-gradient(
      ellipse 62% 52% at 70% 26%,
      var(--tone, #2a2118) 0%,
      transparent 64%
    ),
    radial-gradient(
      ellipse 48% 40% at 88% 76%,
      rgba(0, 224, 198, 0.09) 0%,
      transparent 64%
    ),
    linear-gradient(155deg, #131320 0%, #08080a 68%);
}

.hero__slide.is-on {
  opacity: 1;
}

/* 缓慢放大：让静止的图有呼吸感 */
.hero__slide.is-on.is-kenburns {
  animation: kenburns 18s var(--ease) forwards;
}

@keyframes kenburns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.07);
  }
}

/* --- 压暗层 ---
   分栏后文字不再压在照片上，遮罩可以很轻：
   只需底部把照片收进页面底色，顶部压一点避免导航处过亮。 */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
      to top,
      var(--bg-0) 0%,
      rgba(8, 8, 10, 0.6) 13%,
      transparent 36%
    ),
    /* 顶部压得更重、过渡更长 —— 否则人物头顶会硬生生贴在上边缘 */
      linear-gradient(
        to bottom,
        rgba(8, 8, 10, 0.92) 0%,
        rgba(8, 8, 10, 0.4) 11%,
        transparent 26%
      );
}

/* --- 网格纹理：科技感来源 --- */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  /* 边缘淡出，避免网格显得生硬 */
  -webkit-mask-image: radial-gradient(
    ellipse 80% 70% at 50% 50%,
    #000 20%,
    transparent 78%
  );
  mask-image: radial-gradient(
    ellipse 80% 70% at 50% 50%,
    #000 20%,
    transparent 78%
  );
}

/* --- 内容布局 --- */
.hero__content {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  padding-bottom: var(--sp-8);
  padding-top: calc(var(--nav-h) + var(--sp-8));
  /* 给右侧照片区让位（百分比相对 .hero 的整幅宽度） */
  padding-right: calc(44% + var(--sp-5));
}

.hero__info {
  max-width: 720px;
  /* 切换球员时的入场动画 */
  animation: heroIn 0.7s var(--ease) both;
}

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

.hero__name {
  margin: var(--sp-4) 0 0;
  line-height: 0.92;
}

.hero__name-cn {
  display: block;
  font-size: clamp(3.2rem, 9.5vw, 7.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  /* 顶部微亮、底部微暗，制造金属质感 */
  background: linear-gradient(175deg, #ffffff 0%, #d8d8de 46%, #8e8e9c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__name-en {
  display: block;
  margin-top: var(--sp-3);
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--text-1);
  text-transform: uppercase;
}

/* --- 关键数据条 --- */
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-7);
  margin: var(--sp-7) 0 0;
  padding: 0;
  list-style: none;
}

.hero__stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.hero__stat-label {
  display: block;
  margin-top: var(--sp-2);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-2);
}

/* --- 按钮 --- */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 13px 26px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  /* 窄屏下按钮会变 flex:1 被压扁，中文按钮文字会断成两行（"查看档/案"） */
  white-space: nowrap;
  transition: transform var(--dur) var(--ease),
    background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.btn svg {
  width: 15px;
  height: 15px;
  transition: transform var(--dur) var(--ease);
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 26px -8px var(--brand-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px -8px var(--brand-glow);
}

.btn--primary:hover svg {
  transform: translateX(3px);
}

.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--text-0);
  background: rgba(255, 255, 255, 0.03);
}

.btn--ghost:hover {
  border-color: var(--text-1);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

/* --- 左右切换：放在操作按钮区，取代原来的「换一位」 ---
   不再悬浮在照片上，避免遮挡球员和名字。 */
.hero__switch {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color var(--dur) var(--ease);
}

.hero__switch:hover {
  border-color: var(--text-1);
}

.hero__switch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-height: 46px;
  padding: 0;
  color: var(--text-0);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.hero__switch-btn + .hero__switch-btn {
  border-left: 1px solid var(--line-strong);
}

.hero__switch-btn svg {
  width: 20px;
  height: 20px;
}

.hero__switch-btn:hover {
  background: var(--brand);
  color: #fff;
}

.hero__switch-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

/* --- 轮播指示器（横排，位于文字区下方） --- */
.hero__dots {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin: var(--sp-7) 0 0;
  padding: 0;
  list-style: none;
}

.hero__dots button {
  display: block;
  width: 26px;
  height: 3px;
  padding: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  transition: background var(--dur) var(--ease), width var(--dur) var(--ease);
}

.hero__dots button:hover {
  background: rgba(255, 255, 255, 0.5);
}

.hero__dots button[aria-current="true"] {
  width: 52px;
  background: var(--brand);
  box-shadow: 0 0 14px var(--brand-glow);
}

/* --- 滚动提示 --- */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: var(--sp-5);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  z-index: 2;
}

.hero__scroll-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--text-1),
    transparent
  );
  animation: scrollPulse 2.4s var(--ease) infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scaleY(0.55);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.hero__scroll-text {
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--text-2);
}

/* ============================================================
   通用区块标题
   ============================================================ */

.section-head {
  margin-bottom: var(--sp-8);
}

.section-head h2 {
  margin-top: var(--sp-3);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ============================================================
   数据概览
   ============================================================ */

.overview {
  padding: var(--sp-9) 0;
  background: var(--bg-0);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  /* 用 1px 缝隙 + 底色模拟分隔线 */
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.stat {
  padding: var(--sp-7) var(--sp-6);
  background: var(--bg-1);
  transition: background var(--dur) var(--ease);
}

.stat:hover {
  background: var(--bg-2);
}

.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-0);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  display: block;
  margin-top: var(--sp-4);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.stat__hint {
  display: block;
  margin-top: var(--sp-2);
  font-size: 12px;
  color: var(--text-2);
}

/* ============================================================
   功能入口：分组主卡（v2 · R 星式）
   ------------------------------------------------------------
   四张卡 = 四个分析域。每张卡：组名 + 代表数字（大字报）+ 功能清单。
   切角（.clip-corner）标记「可进入」；「即将」项是路线图展示。
   ============================================================ */

.entries {
  padding: 0 0 var(--sp-9);
  background: var(--bg-0);
}

.groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}

.group {
  display: flex;
  flex-direction: column;
  padding: var(--sp-7) var(--sp-6) var(--sp-5);
  background: var(--bg-1);
  transition: background var(--dur) var(--ease);
}

.group:hover {
  background: var(--bg-2);
}

/* hover 时切角线亮起（.clip-corner::after 的斜线换成品牌橙） */
.group:hover::after {
  background: linear-gradient(
    to bottom left,
    transparent calc(50% - 0.7px),
    var(--brand) calc(50% - 0.7px),
    var(--brand) calc(50% + 0.7px),
    transparent calc(50% + 0.7px)
  );
}

.group__head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
}

.group__name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.group__en {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--text-2);
}

.group__stat {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.group__stat b {
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-0);
}

.group__stat span {
  font-size: 13px;
  color: var(--text-2);
}

.group__links {
  display: grid;
  gap: var(--sp-1);
  margin: var(--sp-6) 0 0;
  padding: var(--sp-5) 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.group__links li {
  display: flex;
}

.group__links a,
.group__links li > span {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 1;
  padding: var(--sp-3) 0;
  font-size: 14px;
  color: var(--text-1);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

/* 行首指示块 */
.group__links a::before,
.group__links li > span::before {
  content: "";
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  background: var(--text-2);
  transition: background var(--dur) var(--ease);
}

.group__links a:hover {
  color: var(--brand-hot);
  transform: translateX(4px);
}

.group__links a:hover::before {
  background: var(--brand);
}

/* 即将开放：整体弱化 + 右侧标签 */
.group__links .is-soon {
  opacity: 0.5;
}

.group__links .is-soon em {
  margin-left: auto;
  padding: 1px 7px;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
}

/* ============================================================
   页脚
   ============================================================ */

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

.foot__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-8);
  text-align: center;
}

.foot__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 14px;
  font-weight: 600;
}

.foot__brand .nav__logo {
  width: 18px;
  height: 18px;
}

.foot__note {
  font-size: 13px;
  color: var(--text-2);
}

.foot__icp {
  font-size: 13px;
  color: var(--text-2);
}

.foot__icp a {
  transition: color var(--dur) var(--ease);
}

.foot__icp a:hover {
  color: var(--text-1);
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

  /* 窄屏放不下左右分栏 → 照片改回全屏背景，靠强遮罩保证文字可读 */
  .hero__bg {
    width: 100%;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero__scrim {
    background: linear-gradient(
        to top,
        rgba(8, 8, 10, 0.97) 0%,
        rgba(8, 8, 10, 0.8) 34%,
        rgba(8, 8, 10, 0.32) 64%,
        rgba(8, 8, 10, 0.68) 100%
      ),
      linear-gradient(
        to right,
        rgba(8, 8, 10, 0.86) 0%,
        rgba(8, 8, 10, 0.28) 62%,
        transparent 100%
      );
  }

  .hero__content {
    padding-right: var(--sp-5);
  }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-5);
    padding: var(--sp-6) var(--sp-5) var(--sp-7);
    background: rgba(8, 8, 10, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    /* 覆盖桌面的居中偏移，恢复成整行下拉 */
    transform: none;
    /* 默认收起 */
    display: none;
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    font-size: 16px;
  }

  .nav__toggle {
    display: flex;
  }

  .hero__content {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: var(--sp-8);
  }

  .hero__switch-btn {
    width: 46px;
  }

  .hero__stats {
    gap: var(--sp-6);
  }

  .hero__scroll {
    display: none;
  }
}

@media (max-width: 520px) {
  .stats {
    grid-template-columns: 1fr;
  }

  /* 11 位球员时圆点会排出两行，缩小尺寸保证一行放得下 */
  .hero__dots {
    gap: 8px;
  }

  .hero__dots button {
    width: 18px;
  }

  .hero__dots button[aria-current="true"] {
    width: 34px;
  }

  .hero__switch-btn {
    width: 44px;
  }

  .hero__actions {
    width: 100%;
  }

  .btn {
    flex: 1;
    justify-content: center;
  }
}
