.page-home {
  background: var(--color-bg-light);
  color: var(--color-text-dark);
}

.page-home a {
  color: inherit;
}

/* ===== Hero 首屏 ===== */
.ph-hero {
  position: relative;
  background: var(--color-primary);
  color: var(--color-text-light);
  padding: 56px 0 112px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 42px), 0 100%);
  overflow: hidden;
}

.ph-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ph-hero__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

.ph-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(105deg, rgba(10, 31, 68, 0.97) 0%, rgba(10, 31, 68, 0.86) 52%, rgba(255, 107, 53, 0.18) 100%);
}

.ph-hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 34px;
}

.ph-hero__kicker {
  margin: 0 0 10px;
  font-family: var(--font-data);
  color: var(--color-accent);
  letter-spacing: 0.14em;
  font-size: 0.875rem;
}

.ph-hero__title {
  margin: 0;
  font-family: var(--font-headline);
  font-weight: 900;
  line-height: 1.08;
}

.ph-hero__title-brand {
  display: block;
  font-size: clamp(1rem, 2vw, 1.375rem);
  letter-spacing: 0.16em;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.ph-hero__title-line {
  display: block;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  color: var(--color-text-light);
}

.ph-hero__lead {
  margin: 22px 0 0;
  max-width: 640px;
  line-height: 1.8;
  color: rgba(229, 233, 240, 0.88);
  font-size: 1.0625rem;
}

.ph-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.page-home .ph-hero .btn--accent {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.page-home .ph-hero .btn--ghost,
.page-home .ph-history .btn--ghost {
  border-color: rgba(229, 233, 240, 0.5);
  color: var(--color-text-light);
}

.ph-hero__index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
}

.ph-hero__index a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(229, 233, 240, 0.2);
  border-radius: 999px;
  text-decoration: none;
  color: var(--color-text-light);
  font-size: 0.875rem;
  transition: background var(--transition), border-color var(--transition);
}

.ph-hero__index a span {
  font-family: var(--font-data);
  color: var(--color-accent);
}

.ph-hero__index a:hover {
  background: rgba(255, 107, 53, 0.14);
  border-color: rgba(255, 107, 53, 0.5);
}

.ph-scoreboard {
  border: 1px solid rgba(229, 233, 240, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(10, 31, 68, 0.34);
  padding: 18px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.ph-scoreboard__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: rgba(229, 233, 240, 0.72);
}

.ph-scoreboard__led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2);
}

.ph-scoreboard__switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ph-scoreboard__switch .league-switcher__btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(229, 233, 240, 0.24);
  background: transparent;
  color: var(--color-text-light);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.ph-scoreboard__switch .league-switcher__btn.is-active,
.ph-scoreboard__switch .league-switcher__btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.ph-scoreboard__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(229, 233, 240, 0.1);
  border: 1px solid rgba(229, 233, 240, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 14px;
}

.ph-stat {
  background: rgba(10, 31, 68, 0.84);
  padding: 14px 12px;
  margin: 0;
}

.ph-stat dt {
  font-size: 0.75rem;
  color: rgba(229, 233, 240, 0.68);
  margin: 0;
}

.ph-stat dd {
  margin: 4px 0 0;
  font-family: var(--font-data);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--color-accent);
}

.ph-stat dd span {
  font-size: 0.85rem;
  color: rgba(229, 233, 240, 0.78);
  margin-left: 2px;
}

/* ===== 三大数据入口 ===== */
.ph-gateways {
  padding: 92px 0 76px;
}

.ph-section-head {
  margin-bottom: 34px;
}

.ph-section-head__idx {
  display: inline-block;
  font-family: var(--font-data);
  color: var(--color-accent);
  letter-spacing: 0.12em;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.ph-section-head__desc {
  margin: 10px 0 0;
  max-width: 640px;
  color: #4b5563;
  line-height: 1.75;
}

.ph-section-head__intro .section-title {
  margin: 0;
}

.ph-gateways__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.ph-gateway {
  position: relative;
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 14px 34px rgba(10, 31, 68, 0.07);
  transition: transform var(--transition), box-shadow var(--transition);
}

.ph-gateway__index {
  display: inline-block;
  font-family: var(--font-data);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin-bottom: 14px;
}

.ph-gateway__title {
  font-size: 1.3rem;
  margin: 0 0 8px;
  color: var(--color-text-dark);
}

.ph-gateway__text {
  margin: 0 0 18px;
  line-height: 1.75;
  color: #4b5563;
  font-size: 0.9375rem;
}

.ph-gateway__link {
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.9375rem;
}

.ph-gateway__link span {
  display: inline-block;
  transition: transform var(--transition);
}

.ph-gateway:hover .ph-gateway__link span {
  transform: translateX(4px);
}

.ph-gateway__fact {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px dashed rgba(255, 107, 53, 0.35);
  padding-top: 18px;
  margin-top: 22px;
}

.ph-gateway__fact-label {
  font-size: 0.8125rem;
  color: #6b7280;
}

.ph-gateway__fact-value {
  font-family: var(--font-data);
  font-size: 2rem;
  color: var(--color-accent);
  line-height: 1;
}

.ph-gateway__fact-note {
  font-size: 0.75rem;
  color: #6b7280;
  margin-left: auto;
}

.ph-gateway__icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 16px;
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 0 8px rgba(255, 107, 53, 0.1);
}

.ph-gateway__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-gateway--report .ph-gateway__body {
  display: flex;
  flex-direction: column;
}

.ph-gateways__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 42px 0 0;
  padding: 18px 22px;
  background: #fff;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-accent);
  color: #4b5563;
  line-height: 1.65;
  font-size: 0.9375rem;
}

.ph-gateways__badge {
  background: var(--color-accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

/* ===== 实时赛季榜单 ===== */
.ph-ranking {
  background: var(--color-bg-dark);
  background-image: linear-gradient(135deg, rgba(255, 107, 53, 0.08), transparent 46%);
  color: var(--color-text-light);
  padding: 84px 0;
}

.ph-ranking__grid {
  display: grid;
  gap: 34px;
}

.ph-ranking .ph-section-head {
  margin-bottom: 30px;
}

.ph-ranking .ph-section-head__desc {
  color: rgba(229, 233, 240, 0.74);
}

.ph-rank__panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ph-rank__panel .league-switcher__btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(229, 233, 240, 0.24);
  background: transparent;
  color: var(--color-text-light);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.ph-rank__panel .league-switcher__btn:hover,
.ph-rank__panel .league-switcher__btn.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.ph-rank__stack {
  flex: 1 1 100%;
  overflow-x: auto;
  margin-top: 8px;
  border: 1px solid rgba(229, 233, 240, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(10, 31, 68, 0.28);
}

.ph-rank-table {
  display: none;
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-family: var(--font-data);
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.ph-rank-table.is-active {
  display: table;
}

.page-home .ph-rank__panel .league-switcher__btn.is-active[data-league-code="EPL"] ~ .ph-rank__stack .ph-rank-table[data-league="EPL"] {
  display: table;
}

.page-home .ph-rank__panel .league-switcher__btn.is-active[data-league-code="LALIGA"] ~ .ph-rank__stack .ph-rank-table[data-league="LALIGA"] {
  display: table;
}

.page-home .ph-rank__panel .league-switcher__btn.is-active[data-league-code="SERIE_A"] ~ .ph-rank__stack .ph-rank-table[data-league="SERIE_A"] {
  display: table;
}

.page-home .ph-rank__panel .league-switcher__btn.is-active[data-league-code="BUNDESLIGA"] ~ .ph-rank__stack .ph-rank-table[data-league="BUNDESLIGA"] {
  display: table;
}

.ph-rank-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.75rem;
  color: rgba(229, 233, 240, 0.62);
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(229, 233, 240, 0.14);
}

.ph-rank-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(229, 233, 240, 0.08);
}

.ph-rank-table tbody tr:last-child td {
  border-bottom: 0;
}

.ph-rank-table tbody tr:hover {
  background: rgba(255, 107, 53, 0.1);
}

.ph-rank-table tbody tr:first-child td {
  color: var(--color-gold);
  font-weight: 700;
}

.ph-ranking__foot {
  margin: 18px 0 0;
  color: rgba(229, 233, 240, 0.68);
  font-size: 0.875rem;
  line-height: 1.7;
}

.ph-ranking__visual {
  margin: 0;
}

.ph-ranking__visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(10, 31, 68, 0.35);
  border: 1px solid rgba(229, 233, 240, 0.12);
}

.ph-ranking__visual figcaption {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: rgba(229, 233, 240, 0.66);
}

@media (scripting: none) {
  .page-home .ph-rank-table {
    display: table;
  }
}

/* ===== 历史快照 ===== */
.ph-history {
  position: relative;
  padding: 96px 0;
  background: var(--color-primary);
  overflow: hidden;
}

.ph-history__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ph-history__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

.ph-history::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(10, 31, 68, 0.94) 0%, rgba(201, 162, 39, 0.24) 100%);
}

.ph-history__inner {
  position: relative;
  z-index: 2;
}

.ph-history__card {
  max-width: 660px;
  background: rgba(10, 31, 68, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: var(--radius-lg);
  padding: 36px;
  color: var(--color-text-light);
  box-shadow: 0 30px 70px rgba(10, 31, 68, 0.45);
}

.ph-history__idx {
  display: inline-block;
  font-family: var(--font-data);
  color: var(--color-gold);
  letter-spacing: 0.14em;
  font-size: 0.875rem;
  margin-bottom: 10px;
}

.ph-history__card .section-title {
  margin: 0 0 12px;
}

.ph-history__text {
  margin: 0;
  line-height: 1.8;
  color: rgba(229, 233, 240, 0.86);
}

.ph-history__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.page-home .ph-history .btn--accent {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-primary);
}

/* ===== 动效 ===== */
@keyframes ph-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ph-hero__intro,
.ph-hero__scoreboard {
  animation: ph-rise 0.6s ease both;
}

.ph-hero__scoreboard {
  animation-delay: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  .ph-hero__intro,
  .ph-hero__scoreboard {
    animation: none;
  }

  .page-home .ph-gateway:hover {
    transform: none;
  }
}

/* ===== 断点适配 ===== */
@media (min-width: 768px) {
  .ph-gateways__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .ph-gateway--wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1080px) {
  .ph-hero__grid {
    grid-template-columns: 1.12fr 0.88fr;
    gap: 64px;
    align-items: center;
  }

  .ph-gateways {
    padding-top: 110px;
  }

  .ph-gateways__grid {
    grid-template-columns: 1.2fr 0.9fr;
    grid-auto-rows: auto;
  }

  .ph-gateway--wide {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .ph-gateway--search {
    grid-column: 2;
    grid-row: 1;
  }

  .ph-gateway--report {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
  }

  .ph-section-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }

  .ph-section-head__desc {
    margin: 0;
  }

  .ph-ranking__grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 48px;
  }

  .ph-history__card {
    padding: 44px;
  }
}
