/* ============ 首页专属样式 ============ */

.page-home {
  --ph-red: #E8352C;
  --ph-blue: #1E71FF;
  --ph-gold: #F5B942;
  --ph-ink: #0B1420;
  --ph-slate: #24303E;
  --ph-rock: #8A93A6;
  --ph-rice: #F4F1EA;
  --ph-moss: #6E7F5C;
  --ph-terra: #C6734F;
  background-color: var(--ph-ink);
  color: var(--ph-rice);
  overflow-x: hidden;
}

.page-home .home-wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}

.page-home .breadcrumb {
  padding-top: 20px;
}

/* 首屏品牌声明 */
.page-home .home-lead {
  display: grid;
  gap: 36px;
  padding-block: 32px 56px;
}

.page-home .home-lead__head {
  max-width: 520px;
}

.page-home .home-lead__title {
  font-family: var(--font-head);
  font-size: clamp(2.9rem, 10vw, 5.2rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transform: skewX(-6deg);
  margin: 18px 0 20px;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.page-home .home-lead__desc {
  color: var(--ph-rock);
  font-size: 15px;
  line-height: 1.7;
  max-width: 46em;
  margin: 0 0 24px;
}

.page-home .home-lead__actions,
.page-home .home-trust__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* 内容目录 */
.page-home .home-catalog {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-radius: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.page-home .home-catalog__title {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  transform: skewX(-6deg);
  margin: 0 0 6px;
}

.page-home .home-catalog__sub {
  color: var(--ph-rock);
  font-size: 13px;
  margin: 0 0 18px;
}

.page-home .home-catalog__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.page-home .home-catalog-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "index name arrow"
    "index desc arrow";
  column-gap: 12px;
  row-gap: 3px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  text-decoration: none;
  color: var(--ph-rice);
  transition: background 0.24s ease;
}

.page-home .home-catalog-item:hover {
  background: linear-gradient(100deg, rgba(232, 53, 44, 0.16), rgba(30, 113, 255, 0.12));
}

.page-home .home-catalog-item__index {
  grid-area: index;
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--ph-blue);
  padding-top: 3px;
}

.page-home .home-catalog-item__name {
  grid-area: name;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
}

.page-home .home-catalog-item__desc {
  grid-area: desc;
  font-size: 12px;
  color: var(--ph-rock);
}

.page-home .home-catalog-item__arrow {
  grid-area: arrow;
  align-self: center;
  color: var(--ph-red);
  font-size: 18px;
  transition: transform 0.24s ease;
}

.page-home .home-catalog-item:hover .home-catalog-item__arrow {
  transform: translateX(4px);
}

/* 氛围图带 */
.page-home .home-stadium {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin: 0 0 56px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-home .home-stadium__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.page-home .home-stadium__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(11, 20, 32, 0.55), rgba(11, 20, 32, 0.1) 40%, rgba(232, 53, 44, 0.25));
}

.page-home .home-stadium__meta {
  position: absolute;
  left: 16px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-home .home-stadium__text {
  font-family: var(--font-head);
  font-size: clamp(0.85rem, 2vw, 1.15rem);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* 通用标题块 */
.page-home .home-title-block {
  position: relative;
  padding-left: 14px;
}

.page-home .home-title-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: linear-gradient(180deg, var(--ph-red), var(--ph-blue));
  transform: skewX(-8deg);
}

.page-home .home-eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ph-red);
}

/* 热门联赛 */
.page-home .home-leagues {
  margin-bottom: 56px;
}

.page-home .home-leagues__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.page-home .home-leagues__title,
.page-home .home-guide__title,
.page-home .home-upgrade__title,
.page-home .home-teams__title,
.page-home .home-updates__title {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.01em;
  transform: skewX(-6deg);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.page-home .home-leagues__sub,
.page-home .home-guide__sub,
.page-home .home-upgrade__sub,
.page-home .home-teams__sub {
  color: var(--ph-rock);
  font-size: 14px;
  line-height: 1.7;
  max-width: 480px;
  margin: 0;
}

.page-home .home-switch {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.page-home .home-switch__tab {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  color: var(--ph-rock);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.page-home .home-switch__tab--active,
.page-home .home-switch__tab:hover {
  background: var(--ph-blue);
  color: #fff;
}

.page-home .home-league-group {
  padding: 26px 0 4px;
  scroll-margin-top: calc(var(--header-h, 72px) + 16px);
}

.page-home .home-league-group__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
}

.page-home .home-league-group__bar {
  display: inline-block;
  width: 6px;
  height: 20px;
  background: var(--ph-red);
  transform: skewX(-12deg);
}

.page-home .home-league-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.page-home .home-league-card {
  position: relative;
  padding: 16px 18px 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.page-home .home-league-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--ph-red);
  transform: skewX(-10deg);
}

.page-home .home-league-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 53, 44, 0.55);
}

.page-home .home-league-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.page-home .home-league-card__round {
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--ph-rock);
}

.page-home .home-league-card__name {
  margin: 0;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
}

.page-home .home-league-card__score {
  margin: 10px 0 4px;
  font-family: var(--font-data);
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
}

.page-home .home-league-card__score span {
  color: var(--ph-red);
  margin: 0 4px;
}

.page-home .home-league-card__match {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ph-rock);
}

.page-home .home-league-card__updated {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--ph-moss);
  background: rgba(110, 127, 92, 0.14);
  border-radius: 4px;
}

/* 指标带 */
.page-home .home-metrics {
  margin: 0 0 56px;
  padding: 24px 18px;
  background:
    linear-gradient(120deg, rgba(30, 113, 255, 0.12), rgba(11, 20, 32, 0) 45%, rgba(232, 53, 44, 0.1)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.page-home .home-metrics__panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 14px;
}

.page-home .home-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-home .home-metric__value {
  font-family: var(--font-data);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ph-rice);
}

.page-home .home-metric__value [data-count] {
  color: var(--ph-gold);
}

.page-home .home-metric__label {
  font-size: 12px;
  color: var(--ph-rock);
}

/* 新用户指南 */
.page-home .home-guide,
.page-home .home-upgrade,
.page-home .home-teams,
.page-home .home-updates {
  margin-bottom: 64px;
}

.page-home .home-guide__grid {
  margin-top: 26px;
}

.page-home .home-guide__list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.page-home .home-guide__step {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-home .home-guide__step-num {
  flex: 0 0 auto;
  height: fit-content;
  padding: 4px 8px;
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--ph-red);
  border: 1px solid rgba(232, 53, 44, 0.4);
  border-radius: 6px;
  transform: skewX(-8deg);
}

.page-home .home-guide__step-title {
  margin: 0 0 4px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
}

.page-home .home-guide__step-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ph-rock);
  line-height: 1.6;
}

/* 图片框架内 img 的通用适配 */
.page-home .picture-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 老用户升级版 */
.page-home .home-upgrade__grid {
  margin-top: 26px;
}

.page-home .home-upgrade__copy {
  display: grid;
  gap: 12px;
}

.page-home .home-upgrade__card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--ph-blue);
  border-radius: 8px 0 0 8px;
}

.page-home .home-upgrade__card--featured {
  background: linear-gradient(100deg, rgba(245, 185, 66, 0.1), rgba(255, 255, 255, 0.03));
  border-left-color: var(--ph-gold);
}

.page-home .home-upgrade__card-title {
  margin: 8px 0 4px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
}

.page-home .home-upgrade__card p {
  margin: 0;
  font-size: 14px;
  color: var(--ph-rock);
  line-height: 1.6;
}

/* 球队库 */
.page-home .home-teams__index {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  margin: 28px 0 22px;
}

.page-home .home-teams__block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
}

.page-home .home-teams__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: skewX(-12deg);
}

.page-home .home-teams__dot--red {
  background: var(--ph-red);
}

.page-home .home-teams__dot--gold {
  background: var(--ph-gold);
}

.page-home .home-teams__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-home .home-teams__list a {
  display: inline-block;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ph-rice);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.page-home .home-teams__list a:hover {
  background: var(--ph-blue);
  color: #fff;
}

/* 更新列表 */
.page-home .home-updates__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.page-home .home-updates__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-home .home-updates__item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-home .home-updates__link {
  color: var(--ph-rice);
  font-size: 15px;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s;
}

.page-home .home-updates__link:hover {
  color: var(--ph-blue);
}

.page-home .home-updates__arrow {
  display: none;
}

/* 信任区 */
.page-home .home-trust {
  padding-bottom: 56px;
}

.page-home .home-trust__panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding: 28px 22px;
  background: linear-gradient(120deg, #16202b, var(--ph-ink));
  border: 1px solid rgba(245, 185, 66, 0.18);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.page-home .home-trust__title {
  margin: 12px 0 10px;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1.05;
}

.page-home .home-trust__text {
  color: var(--ph-rock);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 22px;
  max-width: 560px;
}

.page-home .home-trust__badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.page-home .home-trust__badge {
  padding: 14px 6px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.page-home .home-trust__badge-num {
  display: block;
  font-family: var(--font-data);
  font-size: 24px;
  font-weight: 700;
  color: var(--ph-gold);
}

.page-home .home-trust__badge-label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--ph-rock);
}

/* 平板布局 */
@media (min-width: 680px) {
  .page-home .home-catalog__grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-home .home-catalog-item:last-child {
    grid-column: 1 / -1;
  }

  .page-home .home-league-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-home .home-metrics__panel {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-home .home-guide__grid,
  .page-home .home-upgrade__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: center;
  }

  .page-home .home-teams__index {
    grid-template-columns: 1fr 1fr;
  }

  .page-home .home-updates__item {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
  }

  .page-home .home-updates__arrow {
    display: inline-block;
    color: var(--ph-rock);
  }
}

/* 桌面布局 */
@media (min-width: 960px) {
  .page-home .home-lead {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
    gap: 56px;
    align-items: start;
    padding-block: 48px 72px;
  }

  .page-home .home-stadium {
    aspect-ratio: 21 / 9;
  }

  .page-home .home-leagues__head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .page-home .home-leagues__head-side {
    max-width: 420px;
    text-align: right;
    flex: none;
  }

  .page-home .home-guide__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  .page-home .home-upgrade__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }

  .page-home .home-trust__panel {
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    padding: 40px 36px;
  }
}
