.page-home {
  --home-section-space: clamp(72px, 10vw, 128px);
  --home-border: rgba(245, 247, 250, 0.16);
  --home-chip-bg: rgba(255, 255, 255, 0.08);
  --home-card-bg: rgba(255, 255, 255, 0.08);
}

.page-home img {
  max-width: 100%;
  height: auto;
}

/* ===== 首屏封面区 ===== */
.page-home .home-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-support));
  padding: calc(var(--header-height-mobile) + 32px) 0 112px;
}

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

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

.page-home .home-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(7, 18, 42, 0.22), rgba(7, 18, 42, 0.66)),
    linear-gradient(rgba(245, 247, 250, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 247, 250, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(10, 26, 63, 0.55), rgba(138, 43, 226, 0.35));
  background-size: auto, 44px 44px, 44px 44px, auto;
}

.page-home .home-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 64px;
  background: var(--color-light);
  transform: skewY(-2deg);
  transform-origin: left top;
  z-index: 2;
}

.page-home .home-hero__inner {
  position: relative;
  z-index: 1;
}

.page-home .home-hero .breadcrumbs {
  color: rgba(245, 247, 250, 0.76);
}

.page-home .home-hero .breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.page-home .home-hero h1 {
  margin: 18px 0 20px;
  max-width: 880px;
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transform: skewX(-5deg);
  text-shadow: 3px 3px 0 var(--color-accent);
}

.page-home .home-hero__lead {
  max-width: 720px;
  font-size: 1.06rem;
  line-height: 1.8;
  color: rgba(245, 247, 250, 0.92);
}

.page-home .home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.page-home .home-hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 42px;
  color: rgba(245, 247, 250, 0.76);
  text-decoration: none;
  font-weight: 700;
}

.page-home .home-hero__fav {
  position: fixed;
  top: calc(var(--header-height-mobile) + 12px);
  right: 16px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

@media (min-width: 1024px) {
  .page-home .home-hero__fav {
    top: 28px;
    right: 40px;
    padding: 12px 22px;
  }
}

/* ===== 章节通用 ===== */
.page-home .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--color-accent);
}

.page-home .home-section-head {
  max-width: 720px;
  margin-bottom: 40px;
}

.page-home .home-section-head h2,
.page-home .home-favorite h2,
.page-home .home-fix h2 {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.page-home .section-desc {
  max-width: 760px;
  margin: 12px 0 0;
  line-height: 1.75;
  opacity: 0.84;
}

/* ===== 实时数据面板 ===== */
.page-home .home-data {
  background: var(--color-light);
  color: var(--color-primary);
  padding: var(--home-section-space) 0;
}

.page-home .home-section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: none;
}

.page-home .league-emblem {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.page-home .league-tabs {
  position: relative;
  margin-top: 36px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.page-home .league-tabs > input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.page-home .league-tab {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 8px 8px 0;
  border-radius: var(--radius-pill);
  background: rgba(10, 26, 63, 0.08);
  color: var(--color-primary);
  font-weight: 800;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.page-home .league-tab:hover {
  background: rgba(255, 107, 53, 0.16);
}

.page-home .league-tabs > input[type="radio"]:checked + label {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
}

.page-home .league-tabs > input[type="radio"]:focus-visible + label {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.page-home .league-panels {
  margin-top: 18px;
}

.page-home .league-panel {
  display: none;
  animation: page-home-fade-in 0.3s ease;
}

.page-home #league-eng:checked ~ .league-panels #panel-eng,
.page-home #league-esp:checked ~ .league-panels #panel-esp,
.page-home #league-ger:checked ~ .league-panels #panel-ger,
.page-home #league-ita:checked ~ .league-panels #panel-ita,
.page-home #league-fra:checked ~ .league-panels #panel-fra {
  display: block;
}

@keyframes page-home-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.page-home .league-panel__toolbar-title {
  font-weight: 800;
}

.page-home .league-panel__filter {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(138, 43, 226, 0.1);
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

.page-home .match-list {
  display: grid;
  gap: 14px;
}

@media (min-width: 768px) {
  .page-home .match-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .page-home .match-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.page-home .match-card {
  padding: 18px;
  border-radius: 20px;
  background: var(--color-light);
  border: 1px solid rgba(10, 26, 63, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.page-home .match-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.page-home .match-card__teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.page-home .match-card__team {
  font-weight: 800;
  font-size: 1.05rem;
}

.page-home .match-card__score {
  font-family: var(--font-number);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.page-home .match-card__divider {
  color: rgba(10, 26, 63, 0.4);
  font-weight: 700;
}

.page-home .match-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.page-home .match-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(0, 196, 140, 0.14);
  color: #007a5e;
}

.page-home .match-card__status--live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  animation: page-home-pulse 1.2s infinite alternate;
}

.page-home .match-card__status--done {
  background: rgba(255, 184, 0, 0.16);
  color: #8a6500;
}

@keyframes page-home-pulse {
  from { opacity: 0.4; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.1); }
}

.page-home .match-card__time {
  font-family: var(--font-number);
  font-size: 0.9rem;
  opacity: 0.7;
}

.page-home .match-card__fav {
  display: inline-flex;
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 107, 53, 0.12);
  color: #b84a1f;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}

.page-home .match-card__fav:hover {
  background: var(--color-accent);
  color: #fff;
}

.page-home .form-chart {
  margin-top: 18px;
  padding: 8px 0 0;
  border-top: 1px solid rgba(10, 26, 63, 0.08);
}

.page-home .form-chart svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90px;
}

.page-home .home-data__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 26px;
}

@media (min-width: 768px) {
  .page-home .home-data__stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.page-home .home-data__stats div {
  padding: 18px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.page-home .home-data__stats .data-number {
  display: block;
  font-family: var(--font-number);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-accent);
}

.page-home .home-data__stats span:last-child {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  opacity: 0.72;
}

/* ===== 视频集锦轮播 ===== */
.page-home .home-video {
  background: var(--color-primary);
  color: var(--color-light);
  padding: var(--home-section-space) 0;
}

.page-home .home-video .section-desc {
  color: rgba(245, 247, 250, 0.8);
}

.page-home .video-strip {
  display: flex;
  gap: 18px;
  padding-bottom: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.page-home .video-card {
  flex: 0 0 min(300px, calc(100vw - 48px));
  scroll-snap-align: start;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--home-card-bg);
  border: 1px solid var(--home-border);
}

@media (min-width: 1024px) {
  .page-home .video-card {
    flex-basis: 380px;
  }
}

.page-home .video-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.page-home .video-card__thumb {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.page-home .video-card__thumb img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.page-home .video-card__duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(7, 18, 42, 0.72);
  color: #fff;
  font-size: 0.8rem;
  font-family: var(--font-number);
  line-height: 1;
}

.page-home .video-card h3 {
  margin: 14px 0 6px;
  font-size: 1.15rem;
  line-height: 1.4;
}

.page-home .video-card__meta {
  margin: 0 0 10px;
  font-size: 0.9rem;
  opacity: 0.72;
}

.page-home .video-card__help {
  color: var(--color-warning);
  font-weight: 700;
  text-decoration: none;
}

/* ===== 收藏入口 ===== */
.page-home .home-favorite {
  background: var(--color-light);
  color: var(--color-primary);
  padding: var(--home-section-space) 0;
}

.page-home .home-favorite__card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-support));
  color: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.page-home .home-favorite__card::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 107, 53, 0.24);
}

.page-home .home-favorite__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.page-home .home-favorite__inner p {
  margin: 8px 0 0;
  line-height: 1.7;
  opacity: 0.9;
}

.page-home .home-favorite__card .btn {
  position: relative;
  z-index: 1;
}

/* ===== 常用入口 ===== */
.page-home .home-entry {
  background: var(--color-primary);
  color: var(--color-light);
  padding: var(--home-section-space) 0;
}

.page-home .home-entry .section-desc {
  color: rgba(245, 247, 250, 0.8);
}

.page-home .entry-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-home .entry-pills__label {
  flex: 0 0 100%;
  margin-top: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--color-accent);
}

.page-home .entry-pills__label:first-child {
  margin-top: 0;
}

.page-home .entry-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: var(--home-chip-bg);
  border: 1px solid var(--home-border);
  color: var(--color-light);
  font-weight: 800;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.page-home .entry-pill:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

/* ===== 自动修复工具 ===== */
.page-home .home-fix {
  background: var(--color-light);
  color: var(--color-primary);
  padding: var(--home-section-space) 0;
}

.page-home .home-fix__grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.page-home .home-fix__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

.page-home .home-fix__steps {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding: 0 0 0 20px;
  line-height: 1.6;
}

.page-home .home-fix__steps li::marker {
  color: var(--color-accent);
  font-weight: 800;
}

.page-home .home-fix__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

@media (min-width: 960px) {
  .page-home .home-fix__grid {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

/* ===== 最新动态 ===== */
.page-home .home-news {
  background: var(--color-primary);
  color: var(--color-light);
  padding: var(--home-section-space) 0;
}

.page-home .home-news__list {
  display: grid;
  gap: 18px;
}

@media (min-width: 768px) {
  .page-home .home-news__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.page-home .news-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--home-card-bg);
  border: 1px solid var(--home-border);
}

.page-home .news-card__tag {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 107, 53, 0.18);
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.page-home .news-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.35;
}

.page-home .news-card p {
  flex: 1;
  margin: 0;
  line-height: 1.65;
  opacity: 0.82;
}

.page-home .news-card a {
  color: var(--color-accent);
  font-weight: 800;
  text-decoration: none;
}

/* ===== 可访问性与动效降级 ===== */
.page-home a:focus-visible,
.page-home .league-tab:focus-visible,
.page-home .entry-pill:focus-visible,
.page-home .match-card__fav:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .page-home *,
  .page-home *::before,
  .page-home *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
