/* 比赛中心方案 B：顶栏对齐首页方案五，列表改为一行一卡，场地全称替换运动类型 */
:root {
  --red: #d71920;
  --teal: #0e7490;
  --nav-blue: #0b2ea8;
  --bg: #f2f5fa;
  --card: #ffffff;
  --text: #101522;
  --muted: #697386;
  --line: #e7eaf0;
  --top-line: #e6e3dc;
  font-family: "Noto Sans CJK SC", "Noto Sans SC", "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
img { display: block; max-width: 100%; }

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--top-line);
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar .wrap {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  display: grid;
  place-items: center;
  letter-spacing: 0;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name strong { font-size: 16px; letter-spacing: 0.08em; color: #1a1d21; }
.brand-name small { font-size: 11px; color: #6b7280; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 16px;
  font-size: 15px;
  color: #4b5563;
  border-radius: 8px;
}
.nav-links a.active {
  color: var(--red);
  font-weight: 700;
  background: #fdecec;
}

.site-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}
.match-template-main { padding: 0 0 88px; }
.match-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 14px;
}
.match-breadcrumb a,
.match-breadcrumb strong { color: var(--text); }

.match-schedule-shell {
  padding: 34px 40px 36px;
  background: #fff;
  min-height: 640px;
}

.match-date-bar {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
}
.date-arrow {
  width: 34px;
  height: 52px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 44px;
  line-height: 1;
}
.match-day-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(84px, 1fr));
  gap: 14px;
}
.match-day-tab {
  display: grid;
  gap: 6px;
  min-height: 80px;
  place-content: center;
  border: 0;
  background: transparent;
  color: #99a0ae;
  cursor: pointer;
  text-align: center;
}
.match-day-tab span { font-size: 16px; }
.match-day-tab strong { font-size: 17px; font-weight: 700; }
.match-day-tab.active {
  background: #e9ecfb;
  color: var(--nav-blue);
  font-weight: 900;
}
.date-picker-button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  background: var(--nav-blue);
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
.native-date-input {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.match-template-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -8px 0 14px;
  flex-wrap: wrap;
}
.match-search-box {
  flex: 1 1 320px;
  min-width: 240px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.match-search-box input,
.match-template-tools select {
  min-height: 42px;
  border: 1px solid #dfe4ef;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  font-size: 15px;
}
.match-search-box input { width: 100%; }
.match-search-box input::placeholder { color: #9aa3b2; }
.match-search-box input:focus {
  outline: none;
  border-color: #0e7490;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.12);
}
.match-search-summary {
  margin: -2px 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #5c6573;
}
.match-search-summary[hidden] { display: none; }
.create-match-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 4px;
  background: var(--nav-blue);
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.match-card-list {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}
.match-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  padding: 14px 18px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.08);
}
.match-card.is-focus {
  border-color: rgba(215, 25, 32, 0.28);
  box-shadow: 0 8px 22px rgba(215, 25, 32, 0.12);
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  grid-column: 1 / -1;
}
.card-venue {
  min-width: 0;
  color: var(--teal);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.card-body {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}
.card-time {
  font-size: 15px;
  font-weight: 800;
  color: #5c6573;
}
.card-body.has-date { grid-template-columns: 108px minmax(0, 1fr); }
.card-time.is-dated {
  font-size: 13px;
  line-height: 1.35;
}
.card-matchup {
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  align-items: center;
  gap: 12px;
}
.card-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.card-team.home { justify-content: flex-end; }
.card-team.away { justify-content: flex-start; }
.card-team strong {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-vs {
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  color: #9aa3b2;
}
.card-vs.has-score {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.team-logo {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f0f2f7;
  border: 1px solid #e2e6ef;
  color: #a8afbd;
  font-size: 13px;
  font-weight: 800;
}

.schedule-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--nav-blue);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}
.schedule-action:hover { background: #edf0ff; }
.schedule-action-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #c8ccff;
}
.schedule-action.status-live { color: #e61f2b; }
.schedule-action.status-live .schedule-action-dot { background: #ffc2ca; }
.schedule-action.status-planned,
.schedule-action.status-upcoming { color: #c2410c; }
.schedule-action.status-planned .schedule-action-dot,
.schedule-action.status-upcoming .schedule-action-dot { background: #fed7aa; }

.loading, .empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.site-icp-floating {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  max-width: calc(100vw - 24px);
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(8, 15, 28, 0.82);
  color: #eef6ff;
  font-size: 12px;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}
.site-beian-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #eef6ff;
}
.site-beian-separator {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.16);
}
.site-beian-police-icon { width: auto; height: 16px; }

@media (max-width: 980px) {
  .topbar { height: auto; }
  .topbar .wrap {
    height: auto;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 8px;
  }
  .match-schedule-shell { padding: 22px 16px 28px; }
  .match-date-bar {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    gap: 8px;
  }
  .date-picker-button { grid-column: 1 / -1; }
  .match-day-tabs { gap: 6px; }
  .match-day-tab { min-height: 64px; }
  .card-body { grid-template-columns: 64px minmax(0, 1fr); }
  .card-body.has-date { grid-template-columns: 86px minmax(0, 1fr); }
  .card-team strong { font-size: 16px; }
  .site-icp-floating {
    bottom: calc(12px + env(safe-area-inset-bottom));
    font-size: 11px;
  }
  .site-beian-separator { display: none; }
}
