/* ===== page-home 作用域 ===== */
.page-home {
  --home-label-color: var(--color-primary-gold);
  --home-accent-line: var(--color-accent-fluorescent-green);
  --home-card-bg: rgba(255, 255, 255, 0.03);
  --home-card-border: var(--color-border-subtle);
  --home-overlay-bg: rgba(11, 26, 46, 0.75);
  --home-toc-hover: var(--color-primary-gold);
  --home-font-mono: var(--font-mono);
  display: block;
  width: 100%;
  background-color: var(--color-background-dark-section);
  color: var(--color-text-primary-light);
}

/* ---- 滚动进度条 ---- */
.page-home .scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 999;
  pointer-events: none;
}
.page-home .scroll-progress-inner {
  height: 100%;
  width: 0%;
  background: var(--color-primary-gold);
  transition: width 0.15s ease-out;
}

/* ---- 通用标签 / 节标题 ---- */
.page-home .mono-label {
  font-family: var(--home-font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--home-label-color);
  text-transform: uppercase;
  margin: 0 0 0.5rem 0;
  opacity: 0.8;
}
.page-home .home-label {
  display: inline-block;
  border-bottom: 1px solid var(--home-label-color);
  padding-bottom: 0.25rem;
}

/* ---- 首页首屏 intro ---- */
.page-home .home-intro {
  padding: 3rem 0 2rem 0;
  position: relative;
}
.page-home .home-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
.page-home .home-intro-left {
  order: 2;
}
.page-home .home-intro-right {
  order: 1;
}
.page-home .home-main-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text-primary-light);
  margin: 0.5rem 0 0.75rem 0;
  letter-spacing: -0.01em;
}
.page-home .home-sub-description {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
  max-width: 36em;
}
.page-home .home-toc {
  margin-top: 1.5rem;
}
.page-home .home-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.page-home .toc-link {
  font-family: var(--home-font-mono);
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  display: inline-block;
}
.page-home .toc-link:hover,
.page-home .toc-link:focus-visible {
  color: var(--home-toc-hover);
  border-bottom-color: var(--home-toc-hover);
  outline: none;
}

/* ---- 首屏右侧视觉 ---- */
.page-home .home-intro-visual {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-primary-dark-blue);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.page-home .home-intro-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1200 / 600;
}
.page-home .home-intro-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(transparent, var(--home-overlay-bg));
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.page-home .home-intro-badge {
  font-family: var(--home-font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--color-primary-gold);
  color: var(--color-text-primary-dark);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---- divider ---- */
.page-home .divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, var(--color-border-subtle) 0%, transparent 80%);
  margin: 0 auto;
  opacity: 0.4;
}

/* ---- 通用节区 ---- */
.page-home .home-section {
  padding: 3rem 0;
}
.page-home .home-section-last {
  padding-bottom: 2rem;
}
.page-home .home-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.page-home .home-section-left {
  border-left: 2px solid var(--color-primary-gold);
  padding-left: 1rem;
}
.page-home .home-section-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text-primary-light);
  margin: 0.25rem 0 0.5rem 0;
  line-height: 1.3;
}
.page-home .home-section-annotation {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 28em;
  margin: 0;
}
.page-home .home-section-right {
  min-width: 0;
}

/* ---- 多联赛切换 ---- */
.page-home .league-switcher-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.page-home .league-tab {
  font-family: var(--home-font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}
.page-home .league-tab:hover,
.page-home .league-tab:focus-visible {
  border-color: var(--color-primary-gold);
  color: var(--color-primary-gold);
  outline: none;
}
.page-home .league-tab-active {
  background: var(--color-primary-gold);
  border-color: var(--color-primary-gold);
  color: var(--color-text-primary-dark);
  font-weight: 600;
}
.page-home .league-content-panel {
  background: var(--home-card-bg);
  border: 1px solid var(--home-card-border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.page-home .league-highlight {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
}
.page-home .league-highlight-badge {
  font-family: var(--home-font-mono);
  font-size: 0.7rem;
  background: var(--color-accent-fluorescent-green);
  color: var(--color-text-primary-dark);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.page-home .league-highlight-info {
  display: flex;
  flex-direction: column;
}
.page-home .league-highlight-league {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-family: var(--home-font-mono);
}
.page-home .league-highlight-match {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-primary-light);
  font-family: var(--font-heading);
}
.page-home .league-highlight-meta {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}
.page-home .league-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.page-home .league-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.page-home .league-card:hover {
  border-color: var(--color-border-subtle);
}
.page-home .league-card-label {
  font-family: var(--home-font-mono);
  font-size: 0.75rem;
  color: var(--color-primary-gold);
  min-width: 3em;
}
.page-home .league-card-team {
  font-size: 0.9rem;
  color: var(--color-text-primary-light);
  flex: 1;
}
.page-home .league-card-status {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-family: var(--home-font-mono);
}
.page-home .league-panel-placeholder {
  margin-top: 1rem;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-primary-dark-blue);
}
.page-home .league-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 800 / 450;
  object-fit: cover;
}

/* ---- 赛前前瞻卡片 ---- */
.page-home .preview-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.page-home .preview-card {
  background: var(--home-card-bg);
  border: 1px solid var(--home-card-border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: default;
}
.page-home .preview-card:hover,
.page-home .preview-card:focus-visible {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 32px rgba(212, 168, 67, 0.12);
  outline: none;
}
.page-home .preview-card-visual {
  width: 100%;
  overflow: hidden;
}
.page-home .preview-card-visual img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 400 / 300;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.page-home .preview-card:hover .preview-card-visual img {
  transform: scale(1.04);
}
.page-home .preview-card-body {
  padding: 1rem 1.1rem 1.2rem;
}
.page-home .preview-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.page-home .preview-card-league {
  font-family: var(--home-font-mono);
  font-size: 0.7rem;
  color: var(--color-primary-gold);
  letter-spacing: 0.04em;
}
.page-home .preview-card-time {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  font-family: var(--home-font-mono);
}
.page-home .preview-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-primary-light);
  margin: 0.25rem 0 0.5rem 0;
}
.page-home .preview-card-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.page-home .stat-item {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
}
.page-home .stat-value {
  font-family: var(--home-font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-accent-fluorescent-green);
  margin-right: 0.2rem;
}
.page-home .preview-card-summary {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}
.page-home .preview-footer-link {
  margin-top: 1.5rem;
  text-align: right;
}
.page-home .btn {
  display: inline-block;
  font-family: var(--home-font-mono);
  font-size: 0.85rem;
  padding: 0.55rem 1.4rem;
  background: transparent;
  border: 1px solid var(--color-primary-gold);
  color: var(--color-primary-gold);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.25s ease;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.page-home .btn:hover,
.page-home .btn:focus-visible {
  background: var(--color-primary-gold);
  color: var(--color-text-primary-dark);
  outline: none;
}

/* ---- 安卓更新 ---- */
.page-home .android-update-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  background: var(--home-card-bg);
  border: 1px solid var(--home-card-border);
  border-radius: 8px;
  padding: 1.25rem;
}
.page-home .android-update-visual {
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-primary-dark-blue);
  max-width: 300px;
  margin: 0 auto;
}
.page-home .android-update-visual img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 300 / 500;
  object-fit: cover;
}
.page-home .android-update-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.page-home .android-update-badge {
  font-family: var(--home-font-mono);
  font-size: 0.7rem;
  background: var(--color-primary-gold);
  color: var(--color-text-primary-dark);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  display: inline-block;
  width: fit-content;
  font-weight: 600;
}
.page-home .android-update-version {
  font-family: var(--home-font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text-primary-light);
}
.page-home .android-update-date {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
}
.page-home .android-update-changelog {
  margin: 0.5rem 0;
}
.page-home .changelog-toggle {
  font-family: var(--home-font-mono);
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.page-home .changelog-toggle:hover,
.page-home .changelog-toggle:focus-visible {
  border-color: var(--color-primary-gold);
  color: var(--color-primary-gold);
  outline: none;
}
.page-home .changelog-icon {
  display: inline-block;
  transition: transform 0.25s ease;
  font-weight: 700;
}
.page-home .changelog-toggle[aria-expanded="true"] .changelog-icon {
  transform: rotate(45deg);
}
.page-home .changelog-content {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border-left: 2px solid var(--color-primary-gold);
}
.page-home .changelog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.page-home .changelog-list li {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}
.page-home .changelog-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--color-primary-gold);
}
.page-home .android-update-note {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin: 0.25rem 0 0 0;
}

/* ---- 移动端回访汇总 ---- */
.page-home .revisit-panel {
  position: relative;
  background: var(--home-card-bg);
  border: 1px solid var(--home-card-border);
  border-radius: 8px;
  padding: 1.25rem 1rem;
  overflow: hidden;
}
.page-home .revisit-background {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}
.page-home .revisit-bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-home .revisit-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 1rem;
  padding: 0 0 1rem 0;
  position: relative;
  z-index: 1;
  -webkit-overflow-scrolling: touch;
}
.page-home .revisit-carousel::-webkit-scrollbar {
  height: 4px;
}
.page-home .revisit-carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
.page-home .revisit-carousel::-webkit-scrollbar-thumb {
  background: var(--color-primary-gold);
  border-radius: 4px;
}
.page-home .revisit-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid var(--color-border-subtle);
  min-width: 0;
}
.page-home .revisit-slide-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.page-home .revisit-team {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-primary-light);
}
.page-home .revisit-league-label {
  font-family: var(--home-font-mono);
  font-size: 0.7rem;
  color: var(--color-primary-gold);
  background: rgba(212, 168, 67, 0.15);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}
.page-home .revisit-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.page-home .revisit-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.page-home .revisit-stat-value {
  font-family: var(--home-font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent-fluorescent-green);
}
.page-home .revisit-stat-label {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
}
.page-home .revisit-trend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border-subtle);
}
.page-home .revisit-trend-label {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-family: var(--home-font-mono);
}
.page-home .revisit-trend-line {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-gold);
}
.page-home .revisit-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
}
.page-home .revisit-btn {
  font-size: 1.2rem;
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
  font-family: var(--home-font-mono);
  font-weight: 700;
}
.page-home .revisit-btn:hover,
.page-home .revisit-btn:focus-visible {
  border-color: var(--color-primary-gold);
  color: var(--color-primary-gold);
  outline: none;
}
.page-home .revisit-dots {
  display: flex;
  gap: 0.4rem;
}
.page-home .revisit-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border-subtle);
  transition: background 0.2s ease;
}
.page-home .revisit-dot-active {
  background: var(--color-primary-gold);
}
.page-home .revisit-footnote {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin: 1rem 0 0 0;
  text-align: center;
  font-family: var(--font-body);
}

/* ---- 目录卡片网格 ---- */
.page-home .home-directory-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.page-home .directory-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--home-card-bg);
  border: 1px solid var(--home-card-border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s ease;
}
.page-home .directory-card:hover,
.page-home .directory-card:focus-visible {
  border-color: var(--color-primary-gold);
  background: rgba(212, 168, 67, 0.06);
  transform: translateX(4px);
  outline: none;
}
.page-home .directory-card-num {
  font-family: var(--home-font-mono);
  font-size: 0.9rem;
  color: var(--color-primary-gold);
  opacity: 0.7;
  min-width: 2em;
}
.page-home .directory-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text-primary-light);
  flex: 1;
}
.page-home .directory-card-arrow {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  transition: transform 0.25s ease, color 0.25s ease;
}
.page-home .directory-card:hover .directory-card-arrow {
  transform: translateX(4px);
  color: var(--color-primary-gold);
}

/* ---- 回到顶部 ---- */
.page-home .home-back-top {
  text-align: center;
  padding: 1.5rem 0 3rem 0;
}
.page-home .btn-back-top {
  font-size: 0.8rem;
  padding: 0.4rem 1.2rem;
}

/* ===== 响应式：平板及以上 ===== */
@media (min-width: 768px) {
  .page-home .home-intro {
    padding: 4rem 0 3rem 0;
  }
  .page-home .home-intro-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
  }
  .page-home .home-intro-left {
    order: 1;
  }
  .page-home .home-intro-right {
    order: 2;
  }
  .page-home .home-main-title {
    font-size: 2.8rem;
  }
  .page-home .home-sub-description {
    font-size: 1.05rem;
  }
  .page-home .home-section {
    padding: 4rem 0;
  }
  .page-home .home-section-grid {
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
  }
  .page-home .home-section-title {
    font-size: 1.8rem;
  }
  .page-home .home-section-left {
    padding-left: 1.25rem;
  }
  .page-home .league-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-home .preview-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-home .android-update-card {
    grid-template-columns: auto 1fr;
    align-items: start;
  }
  .page-home .android-update-visual {
    max-width: 220px;
    margin: 0;
  }
  .page-home .home-directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-home .revisit-slide {
    flex: 0 0 calc(50% - 0.5rem);
  }
}

/* ===== 响应式：桌面 ===== */
@media (min-width: 1024px) {
  .page-home .home-intro {
    padding: 5rem 0 3.5rem 0;
  }
  .page-home .home-main-title {
    font-size: 3.2rem;
  }
  .page-home .home-section-grid {
    grid-template-columns: 1fr 2.2fr;
    gap: 3rem;
  }
  .page-home .preview-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-home .home-directory-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-home .revisit-slide {
    flex: 0 0 calc(33.33% - 0.7rem);
  }
}

/* ===== 卡片入场微动画 ===== */
@keyframes homeCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.page-home .preview-card,
.page-home .league-card,
.page-home .directory-card,
.page-home .android-update-card {
  animation: homeCardFadeIn 0.6s ease both;
}
.page-home .preview-card:nth-child(1),
.page-home .league-card:nth-child(1),
.page-home .directory-card:nth-child(1) {
  animation-delay: 0.05s;
}
.page-home .preview-card:nth-child(2),
.page-home .league-card:nth-child(2),
.page-home .directory-card:nth-child(2) {
  animation-delay: 0.12s;
}
.page-home .preview-card:nth-child(3),
.page-home .league-card:nth-child(3),
.page-home .directory-card:nth-child(3) {
  animation-delay: 0.19s;
}
.page-home .directory-card:nth-child(4) {
  animation-delay: 0.26s;
}
.page-home .directory-card:nth-child(5) {
  animation-delay: 0.33s;
}
