/* ===== 页面专属：数据面板 (home) ===== */
.page-home {
  --ph-gold: #ffd700;
  --ph-accent: #39ff14;
  --ph-bg-card: #2a2a2e;
  --ph-text: #f5f5dc;
  --ph-text-white: #ffffff;
  --ph-border: rgba(57, 255, 20, 0.15);
  --ph-border-light: rgba(245, 245, 220, 0.1);
  --ph-shadow: 0 2px 12px rgba(0,0,0,0.4);
  --ph-radius: 4px;
  --ph-gap: 16px;
  --ph-section-spacing: 48px;

  position: relative;
  padding: 24px 16px 48px;
  color: var(--ph-text);
  font-family: 'Inter', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: #0a192f;
  min-height: calc(100vh - 120px);
  overflow-x: hidden;
}

/* 背景纹理 */
.ph-bg-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: screen;
}
.ph-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 所有主内容在纹理之上 */
.page-home > *:not(.ph-bg-texture) {
  position: relative;
  z-index: 1;
}

/* 面包屑 */
.ph-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: var(--font-mono, 'Roboto Condensed', monospace);
  color: rgba(245, 245, 220, 0.5);
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}
.ph-breadcrumb-link {
  color: var(--ph-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
.ph-breadcrumb-link:hover {
  opacity: 0.7;
}
.ph-breadcrumb-sep {
  color: rgba(245, 245, 220, 0.25);
}
.ph-breadcrumb-current {
  color: var(--ph-text-white);
  font-weight: 500;
}

/* 通用 mono */
.mono {
  font-family: var(--font-mono, 'Roboto Condensed', 'SF Mono', 'Fira Code', 'Consolas', monospace);
  font-variant-numeric: tabular-nums;
}

/* 通用强调色 */
.text-accent { color: var(--ph-accent); }
.text-helper { color: #4a7c59; }
.text-gold { color: var(--ph-gold); }

/* === 区块通用 === */
.ph-section-index {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ph-gold);
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.ph-section-title {
  font-family: 'Inter', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 800;
  font-stretch: expanded;
  letter-spacing: -0.5px;
  font-size: 26px;
  color: var(--ph-text-white);
  margin: 0 0 6px;
  line-height: 1.2;
}
.ph-section-desc {
  font-size: 15px;
  color: rgba(245, 245, 220, 0.75);
  margin: 0 0 20px;
  line-height: 1.5;
}
.ph-section-header {
  margin-bottom: 28px;
  position: relative;
}

/* === 实时数据看板 === */
.ph-dashboard {
  margin-bottom: var(--ph-section-spacing);
}
.ph-dashboard-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}
.ph-dashboard-title-group {
  flex: 1;
}
.ph-dashboard-title {
  font-family: 'Inter', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 800;
  font-stretch: expanded;
  letter-spacing: -0.5px;
  font-size: 28px;
  color: var(--ph-text-white);
  margin: 0 0 8px;
  line-height: 1.15;
}
.ph-dashboard-desc {
  font-size: 15px;
  color: rgba(245, 245, 220, 0.7);
  margin: 0;
  line-height: 1.5;
}
.ph-dashboard-visual {
  flex-shrink: 0;
  border-radius: var(--ph-radius);
  overflow: hidden;
  box-shadow: var(--ph-shadow);
  border: 1px solid var(--ph-border);
  max-width: 100%;
}
.ph-dashboard-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 800 / 500;
}

/* 数据卡片网格 */
.ph-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ph-gap);
  margin-bottom: 24px;
}

.ph-data-card {
  background: var(--ph-bg-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  box-shadow: var(--ph-shadow);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.ph-data-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--ph-accent);
  opacity: 0.3;
  transition: opacity 0.3s;
}
.ph-data-card:hover {
  border-color: rgba(57, 255, 20, 0.4);
  box-shadow: 0 4px 24px rgba(57, 255, 20, 0.12);
  transform: translateY(-2px);
}
.ph-data-card:hover::before {
  opacity: 1;
}
.ph-data-card-inner {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.ph-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(245, 245, 220, 0.55);
  font-weight: 500;
  margin-bottom: 4px;
}
.ph-card-big-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--ph-text-white);
  line-height: 1;
  letter-spacing: -1px;
}
.ph-card-unit {
  font-size: 14px;
  color: var(--ph-accent);
  font-weight: 500;
  margin-left: 2px;
}
.ph-card-sub {
  font-size: 11px;
  color: rgba(245, 245, 220, 0.45);
  letter-spacing: 0.3px;
  margin-top: 4px;
}
.ph-card-chart {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.ph-arc-svg {
  width: 100%;
  max-width: 140px;
  height: auto;
  display: block;
}
.ph-arc-bg {
  color: rgba(245, 245, 220, 0.08);
}
.ph-arc-fg {
  color: var(--ph-accent);
  filter: drop-shadow(0 0 6px rgba(57, 255, 20, 0.25));
  transition: stroke-dashoffset 0.6s ease;
}
.ph-data-card:hover .ph-arc-fg {
  filter: drop-shadow(0 0 10px rgba(57, 255, 20, 0.4));
}
.ph-data-card .ph-card-big-num {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  font-weight: 700;
  color: var(--ph-text-white);
  text-shadow: 0 0 12px rgba(57, 255, 20, 0.15);
}
.ph-data-card .ph-card-unit {
  position: absolute;
  bottom: 6px;
  right: 16px;
  font-size: 12px;
}

/* 额外区域 */
.ph-dashboard-extra {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(42, 42, 46, 0.6);
  border: 1px solid var(--ph-border-light);
  border-radius: var(--ph-radius);
  align-items: flex-start;
}
.ph-extra-text {
  font-size: 14px;
  color: rgba(245, 245, 220, 0.7);
  margin: 0;
  line-height: 1.5;
}
.ph-extra-link {
  align-self: flex-start;
}

/* 通用按钮 (继承共享 btn 族) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  line-height: 1.4;
  letter-spacing: 0.3px;
}
.btn-outline {
  background: transparent;
  color: var(--ph-accent);
  border: 1.5px solid var(--ph-accent);
}
.btn-outline:hover {
  background: rgba(57, 255, 20, 0.1);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.15);
}

/* === 联赛导航 === */
.ph-league {
  margin-bottom: var(--ph-section-spacing);
}
.ph-league-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ph-gap);
  margin-bottom: 20px;
}
.ph-league-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  background: var(--ph-bg-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  text-decoration: none;
  color: var(--ph-text);
  transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.ph-league-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ph-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s;
}
.ph-league-card:hover {
  border-color: rgba(57, 255, 20, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.ph-league-card:hover::after {
  transform: scaleX(1);
}
.ph-league-icon {
  width: 40px;
  height: 40px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
}
.ph-league-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ph-text-white);
  flex: 1;
}
.ph-league-arrow {
  font-size: 16px;
  color: var(--ph-accent);
  opacity: 0.5;
  transition: opacity 0.25s, transform 0.2s;
}
.ph-league-card:hover .ph-league-arrow {
  opacity: 1;
  transform: translateX(4px);
}
.ph-league-footer {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}
.ph-league-more {
  align-self: center;
}

/* === 比赛记录 === */
.ph-matches {
  margin-bottom: 16px;
}
.ph-match-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.ph-match-item {
  background: var(--ph-bg-card);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  overflow: hidden;
  transition: border-color 0.25s;
}
.ph-match-item[open] {
  border-color: rgba(57, 255, 20, 0.3);
}
.ph-match-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
}
.ph-match-summary::-webkit-details-marker {
  display: none;
}
.ph-match-summary:hover {
  background: rgba(57, 255, 20, 0.03);
}
.ph-match-thumb {
  width: 52px;
  height: 34px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
}
.ph-match-round {
  font-size: 15px;
  font-weight: 600;
  color: var(--ph-text-white);
  min-width: 52px;
}
.ph-match-date {
  font-size: 13px;
  color: rgba(245, 245, 220, 0.5);
  flex: 1;
}
.ph-match-status {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 2px;
  background: rgba(57, 255, 20, 0.08);
}
.ph-match-status.text-helper {
  background: rgba(74, 124, 89, 0.15);
  color: #4a7c59;
}
.ph-match-toggle {
  font-size: 18px;
  font-weight: 600;
  color: var(--ph-accent);
  transition: transform 0.25s;
  line-height: 1;
}
.ph-match-item[open] .ph-match-toggle {
  transform: rotate(45deg);
}
.ph-match-detail {
  padding: 0 14px 14px;
  border-top: 1px solid var(--ph-border-light);
  margin-top: 0;
}
.ph-match-stats {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}
.ph-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(245,245,220,0.04);
}
.ph-stat-label {
  color: rgba(245,245,220,0.55);
}
.ph-stat-value {
  font-weight: 500;
  font-size: 14px;
}
.ph-matches-footer {
  display: flex;
  justify-content: center;
}
.ph-matches-help {
  align-self: center;
}

/* ===== 移动端优先 — 小屏基础已适配 ===== */

/* 窄屏 (≤480px) 微调 */
@media (max-width: 480px) {
  .page-home {
    padding: 16px 12px 36px;
  }
  .ph-dashboard-title {
    font-size: 24px;
  }
  .ph-section-title {
    font-size: 22px;
  }
  .ph-card-grid {
    gap: 12px;
  }
  .ph-card-big-num {
    font-size: 26px;
  }
  .ph-data-card .ph-card-big-num {
    font-size: 24px;
  }
  .ph-league-grid {
    gap: 12px;
  }
  .ph-match-thumb {
    width: 40px;
    height: 28px;
  }
  .ph-match-round {
    font-size: 13px;
    min-width: 40px;
  }
  .ph-match-date {
    font-size: 12px;
  }
  .ph-stat-row {
    font-size: 12px;
  }
}

/* 平板 (≥600px) */
@media (min-width: 600px) {
  .page-home {
    padding: 32px 24px 56px;
  }
  .ph-card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .ph-league-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .ph-dashboard-header {
    flex-direction: row;
    align-items: flex-end;
  }
  .ph-dashboard-visual {
    max-width: 360px;
  }
  .ph-dashboard-title {
    font-size: 32px;
  }
  .ph-section-title {
    font-size: 28px;
  }
  .ph-match-stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .ph-match-thumb {
    width: 60px;
    height: 38px;
  }
}

/* 桌面 (≥960px) — 配合侧边导航 */
@media (min-width: 960px) {
  .page-home {
    margin-left: 0;
    padding: 40px 40px 64px;
    max-width: calc(100% - 0px);
  }
  .ph-card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .ph-league-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .ph-dashboard-header {
    flex-direction: row;
    align-items: flex-end;
    gap: 32px;
  }
  .ph-dashboard-visual {
    max-width: 420px;
  }
  .ph-dashboard-title {
    font-size: 36px;
  }
  .ph-section-title {
    font-size: 30px;
  }
  .ph-dashboard-extra {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .ph-match-summary {
    padding: 14px 20px;
  }
  .ph-match-thumb {
    width: 72px;
    height: 44px;
  }
  .ph-match-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 24px;
  }
  .ph-data-card-inner {
    padding: 20px 18px;
  }
  .ph-card-big-num {
    font-size: 36px;
  }
}

/* 宽屏 (≥1280px) */
@media (min-width: 1280px) {
  .page-home {
    padding: 48px 56px 72px;
  }
  .ph-card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  .ph-league-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  .ph-dashboard-visual {
    max-width: 480px;
  }
  .ph-dashboard-title {
    font-size: 40px;
  }
  .ph-section-title {
    font-size: 34px;
  }
}
