/* ============================================================
   乒乓世界 · 赛程中心视觉升级（2026-11-06）
   ------------------------------------------------------------
   赛事卡片改成维度卡片墙；晋级路线图与对阵卡片统一成球台记分牌风格。
   本文件在 schedule.css 之后加载，只做覆盖。
   ============================================================ */

/* ---------- 赛事卡片：不再横向拖动 ---------- */
.hub__events {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  overflow: visible;
  padding: 0;
  margin-bottom: var(--sp-4);
}

.hub__event-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 132px;
  padding: 18px 20px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(165deg, #101c2b 0%, #0b1320 62%, #0a111c 100%);
  color: var(--text-1);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.hub__event-chip::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  background: transparent;
  transition: background 0.2s ease;
}

.hub__event-chip:hover,
.hub__event-chip:focus-visible {
  border-color: rgba(255, 255, 255, 0.24);
  outline: none;
}

.hub__event-chip.is-active {
  border-color: rgba(255, 122, 61, 0.5);
  background: #101b2a;
  box-shadow: 0 12px 34px rgba(255, 92, 26, 0.12);
}

.hub__event-chip:hover::before,
.hub__event-chip:focus-visible::before,
.hub__event-chip.is-active::before {
  background: var(--brand);
}

.hub__event-chip__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hub__event-chip__state {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.hub__event-chip__state.is-live {
  border-color: rgba(255, 122, 61, 0.5);
  border-style: dashed;
  color: var(--brand-hot);
}

.hub__event-chip__state.is-upcoming {
  border-color: rgba(47, 224, 200, 0.35);
  color: #7de8d8;
}

.hub__event-chip__date {
  color: var(--text-2);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hub__event-chip__name {
  flex: 1;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #f2ead9;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.25;
  white-space: normal;
}

.hub__event-chip__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 晋级路线图：球台记分牌 ---------- */
.hub__bracket-wrap {
  background:
    radial-gradient(900px 320px at 50% -10%, rgba(47, 224, 200, 0.09), transparent 60%),
    linear-gradient(180deg, #0a1720 0%, #070f14 100%);
  border-top: 1px solid rgba(120, 255, 230, 0.14);
  border-bottom: 1px solid rgba(120, 255, 230, 0.14);
}

.hub__bracket-wrap::before {
  background: linear-gradient(90deg, #0a1720 12%, transparent);
}

.hub__bracket-wrap::after {
  background: linear-gradient(270deg, #0a1720 12%, transparent);
}

.hub__bracket {
  padding-top: 74px;
}

.hub__round-title {
  position: relative;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f2ead9;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.hub__round-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 30px;
  height: 2px;
  background: var(--brand);
}

.hub__node {
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.hub__node:hover,
.hub__node:focus-visible {
  border-color: rgba(255, 122, 61, 0.55);
  box-shadow: 0 10px 26px rgba(255, 92, 26, 0.12);
}

.hub__node.is-active {
  border-color: var(--brand);
  background: linear-gradient(160deg, rgba(255, 92, 26, 0.2), rgba(255, 92, 26, 0.05));
  box-shadow:
    0 0 0 1px var(--brand) inset,
    0 12px 30px rgba(255, 92, 26, 0.18);
}

.hub__node.is-final {
  border-color: rgba(255, 206, 122, 0.5);
  background: linear-gradient(160deg, rgba(255, 206, 122, 0.12), rgba(255, 255, 255, 0.02));
}

.hub__node.is-final .hub__node-name {
  color: #fff3dc;
}

.hub__node-score {
  font-family: var(--font-display);
  font-weight: 700;
}

.hub__edge {
  stroke: rgba(120, 255, 230, 0.28);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 3px rgba(47, 224, 200, 0.22));
}

.hub__zoom {
  border-radius: 14px;
}

/* ---------- 对阵卡片：球台记分牌 ---------- */
.match-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(120, 255, 230, 0.12);
  background:
    radial-gradient(900px 320px at 82% -10%, rgba(255, 92, 26, 0.14), transparent 62%),
    radial-gradient(700px 360px at 10% 112%, rgba(47, 224, 200, 0.08), transparent 62%),
    linear-gradient(180deg, #0c1722 0%, #080f16 100%);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.match-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), rgba(47, 224, 200, 0.55));
}

.match-card__event {
  color: #f2ead9;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 600;
}

.match-card__stage {
  padding: 7px 16px;
  font-size: 12.5px;
}

.match-card__when {
  width: fit-content;
  margin: 0 auto;
  padding: 10px 26px;
  border: 1px solid rgba(255, 122, 61, 0.28);
  border-radius: 999px;
  background: rgba(255, 92, 26, 0.08);
  color: #ffb37a;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  letter-spacing: 0.05em;
  text-shadow: none;
}

.match-card__main {
  position: relative;
}

.match-card__main::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6%;
  bottom: 6%;
  width: 1px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.12), transparent);
}

.match-card__vs {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: #0b1420;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.match-card__avatar {
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.03),
    0 18px 40px rgba(0, 0, 0, 0.35);
}

.match-card__side.is-winner .match-card__avatar {
  border-color: rgba(255, 122, 61, 0.55);
  box-shadow:
    0 0 0 6px rgba(255, 92, 26, 0.08),
    0 0 38px rgba(255, 92, 26, 0.22);
}

.match-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
}

.match-card__side.is-winner .match-card__score {
  background: linear-gradient(120deg, #ffd2b8, #ff7a3d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.match-card__games {
  gap: 6px 8px;
}

.match-card__game {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.match-card__game b.is-win {
  color: #f6eedf;
}

.match-card__ms {
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.match-card__foot {
  color: var(--text-2);
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .hub__events {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .match-card__main::before {
    display: none;
  }
}

@media (max-width: 720px) {
  .hub__events {
    grid-template-columns: 1fr;
  }
  .hub__event-chip {
    min-height: 0;
    padding: 16px 16px 12px;
  }
  .hub__event-chip::before {
    left: 16px;
    right: 16px;
  }
  .hub__event-chip__name {
    font-size: 19px;
  }
  .match-card__when {
    padding: 8px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub__event-chip {
    transition: none;
  }
}
