/**
 * match-detail.css — 比赛详情页专用样式（Pro 级别）
 */

/* ── Hero ── */
.ag-match-hero {
  background: linear-gradient(180deg, var(--ag-bg-secondary) 0%, color-mix(in srgb, var(--ag-bg-secondary) 90%, var(--ag-accent)) 100%);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-lg);
  padding: var(--ag-space-6) var(--ag-space-8);
  margin: var(--ag-space-6) 0 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--ag-shadow-md);
}
.ag-match-hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.ag-match-hero__league {
  display: flex; align-items: center; gap: var(--ag-space-2);
  font-size: var(--ag-font-sm);
  color: var(--ag-text-secondary);
  margin-bottom: var(--ag-space-4);
  position: relative;
  z-index: 1;
}
.ag-match-hero__league img {
  width: 20px; height: 20px;
  border-radius: 2px;
  background: rgba(255,255,255,0.05);
  padding: 1px;
}

.ag-match-hero__body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--ag-space-8);
  position: relative;
  z-index: 1;
}

.ag-match-hero__team {
  display: flex; flex-direction: column; align-items: center; gap: var(--ag-space-3);
  text-align: center;
}
.ag-match-hero__team img {
  width: 56px; height: 56px; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform var(--ag-transition-fast);
}
.ag-match-hero__team:hover img {
  transform: scale(1.08);
}
.ag-match-hero__team a {
  font-size: var(--ag-font-lg);
  font-weight: var(--ag-weight-semibold);
  color: var(--ag-text-primary);
  transition: color var(--ag-transition-fast);
}
.ag-match-hero__team a:hover { color: var(--ag-accent); }

.ag-match-hero__center { text-align: center; }
.ag-match-hero__score {
  display: flex; align-items: center; gap: var(--ag-space-4);
  font-family: var(--ag-font-mono);
  font-size: 2.5rem;
  font-weight: var(--ag-weight-bold);
  color: var(--ag-text-primary);
  justify-content: center;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.ag-match-hero__score--live {
  color: var(--ag-live);
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}
.ag-match-hero__ht {
  font-size: var(--ag-font-sm);
  color: var(--ag-text-secondary);
  margin-top: var(--ag-space-1);
}
.ag-match-hero__time {
  font-size: var(--ag-font-2xl);
  font-weight: var(--ag-weight-bold);
  color: var(--ag-text-primary);
}
.ag-match-hero__status {
  font-size: var(--ag-font-sm);
  color: var(--ag-text-secondary);
  margin-top: var(--ag-space-2);
  font-weight: var(--ag-weight-medium);
  letter-spacing: 0.05em;
}
.ag-match-hero__status--live {
  color: var(--ag-live);
  font-weight: var(--ag-weight-bold);
  animation: ag-pulse 1.5s ease-in-out infinite;
}

.ag-match-hero__meta {
  display: flex; justify-content: center; gap: var(--ag-space-6);
  margin-top: var(--ag-space-5);
  padding-top: var(--ag-space-3);
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: var(--ag-font-xs);
  color: var(--ag-text-tertiary);
  position: relative;
  z-index: 1;
}
.ag-match-hero__meta span { display: flex; align-items: center; gap: 4px; }

/* ── Events Timeline ── */
.ag-match-events {
  padding: var(--ag-space-4);
}

.ag-event {
  display: flex; align-items: flex-start; gap: var(--ag-space-3);
  padding: var(--ag-space-2) var(--ag-space-3);
  border-radius: var(--ag-radius-md);
  transition: background var(--ag-transition-fast);
  border-bottom: 1px solid var(--ag-border-light);
}
.ag-event:hover { background: var(--ag-bg-hover); }

.ag-event__time {
  font-family: var(--ag-font-mono);
  font-size: var(--ag-font-sm);
  color: var(--ag-accent);
  min-width: 40px;
  font-weight: var(--ag-weight-semibold);
}

.ag-event__icon { font-size: var(--ag-font-lg); }

.ag-event__player {
  font-weight: var(--ag-weight-semibold);
  color: var(--ag-text-primary);
}

.ag-event__assist {
  color: var(--ag-text-secondary);
  font-size: var(--ag-font-sm);
}

.ag-event__type {
  font-size: var(--ag-font-xs);
  color: var(--ag-text-tertiary);
  display: block;
}

.ag-event--away { flex-direction: row-reverse; text-align: right; }

/* ── Stats Bars ── */
.ag-match-stats { padding: var(--ag-space-4); }
.ag-stat-row {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  gap: var(--ag-space-3);
  padding: var(--ag-space-2) 0;
}
.ag-stat-row__val {
  font-family: var(--ag-font-mono);
  font-size: var(--ag-font-sm);
  font-weight: var(--ag-weight-bold);
  color: var(--ag-text-primary);
}
.ag-stat-row__val:last-child { text-align: right; }
.ag-stat-row__bar { position: relative; }
.ag-stat-row__label {
  display: block; text-align: center;
  font-size: var(--ag-font-xs);
  color: var(--ag-text-secondary);
  margin-bottom: var(--ag-space-1);
  font-weight: var(--ag-weight-medium);
}
.ag-stat-bar {
  display: flex; height: 6px;
  border-radius: 3px; overflow: hidden;
  background: var(--ag-bg-tertiary);
}
.ag-stat-bar__fill {
  height: 100%;
  transition: width 1s ease;
  border-radius: 3px;
}
.ag-stat-bar__fill--home {
  background: linear-gradient(90deg, var(--ag-accent), #60a5fa);
}
.ag-stat-bar__fill--away {
  background: linear-gradient(90deg, var(--ag-text-tertiary), #a3a3a3);
}

/* ── Lineups ── */
.ag-lineups { padding: var(--ag-space-4); }
.ag-lineups__formations {
  display: flex; justify-content: space-between;
  padding: var(--ag-space-3) var(--ag-space-4);
  font-size: var(--ag-font-md);
  font-weight: var(--ag-weight-bold);
  color: var(--ag-text-primary);
  background: var(--ag-bg-tertiary);
  border-radius: var(--ag-radius-md);
  margin-bottom: var(--ag-space-3);
}
.ag-lineups__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--ag-space-4);
  margin-top: var(--ag-space-3);
}
.ag-lineups__title {
  font-size: var(--ag-font-xs);
  font-weight: var(--ag-weight-bold);
  color: var(--ag-text-secondary);
  padding: var(--ag-space-2) 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--ag-border-light);
  margin-bottom: var(--ag-space-1);
}
.ag-lineup-player {
  display: flex; align-items: center; gap: var(--ag-space-2);
  padding: 5px 0;
  font-size: var(--ag-font-sm);
  transition: background var(--ag-transition-fast);
  border-radius: var(--ag-radius-sm);
}
.ag-lineup-player:hover { background: var(--ag-bg-hover); padding-left: 4px; }
.ag-lineup-player--sub { opacity: 0.6; }
.ag-lineup-player__num {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ag-font-mono);
  font-size: var(--ag-font-xs);
  color: var(--ag-text-secondary);
  background: var(--ag-bg-tertiary);
  border-radius: var(--ag-radius-sm);
  font-weight: var(--ag-weight-semibold);
}
.ag-lineup-player__name { flex: 1; color: var(--ag-text-primary); }
.ag-lineup-player__pos {
  font-size: 10px;
  color: var(--ag-accent);
  padding: 1px 6px;
  background: rgba(37, 99, 235, 0.1);
  border-radius: var(--ag-radius-sm);
  font-weight: var(--ag-weight-semibold);
  letter-spacing: 0.05em;
}

/* ── 比赛详情 CTA ── */
.ag-match-detail__cta {
  margin-top: var(--ag-space-4);
  text-align: center;
}

/* ── Odds Compact (match-odds tab) ── */
.ag-odds-compact {
  padding: var(--ag-space-4);
}
.ag-odds-compact .ag-odds-table {
  width: 100%;
}

/* ── H2H Section (match-h2h tab) ── */
.ag-h2h-section {
  padding: var(--ag-space-4);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .ag-match-hero { padding: var(--ag-space-4); }
  .ag-match-hero__body { gap: var(--ag-space-4); }
  .ag-match-hero__team img { width: 44px; height: 44px; }
  .ag-match-hero__score { font-size: var(--ag-font-2xl); }
  .ag-match-hero__meta { flex-direction: column; align-items: center; gap: var(--ag-space-2); }
  .ag-lineups__grid { grid-template-columns: 1fr; }
}
