/* =============================================================
   MS-PRO NEXT GENERATION — SPORTS-SPECIFIC CSS
   Scoreboards, live indicators, standings tables, match cards,
   team badges, fixture lists, sports route pages
   ============================================================= */

/* ══════════════════════════════════════
   LIVE INDICATOR
   ══════════════════════════════════════ */
.ms-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--color-live);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--fw-extrabold);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  border-radius: var(--radius-full);
  animation: glow-pulse 2s ease-in-out infinite;
}
.ms-live-badge__dot {
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  animation: pulse-live 1.2s ease-in-out infinite;
}

/* ══════════════════════════════════════
   MATCH HERO SCOREBOARD
   ══════════════════════════════════════ */
.ms-match-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  padding: var(--space-12) 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ms-match-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(99,102,241,0.15) 0%, transparent 50%),
                    radial-gradient(circle at 80% 50%, rgba(14,165,233,0.10) 0%, transparent 50%);
  pointer-events: none;
}
.ms-match-hero__inner {
  position: relative;
  z-index: 1;
}

/* Team layout */
.ms-match-hero__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.ms-match-hero__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

/* Badge circle */
.ms-team-badge-wrap {
  width: 96px;
  height: 96px;
  background: rgba(255,255,255,0.95);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  padding: var(--space-3);
  flex-shrink: 0;
}
.ms-team-badge-wrap img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.ms-match-hero__team-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  color: #fff;
  line-height: var(--lh-tight);
}

/* Center scoreboard */
.ms-match-hero__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.ms-match-hero__league-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: rgba(255,255,255,0.9);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.ms-match-hero__score {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.ms-match-hero__score-num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: var(--fw-black);
  line-height: 1;
  color: #fff;
  letter-spacing: var(--ls-tight);
  text-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.ms-match-hero__score-sep {
  font-size: var(--text-4xl);
  font-weight: var(--fw-light);
  opacity: 0.4;
  color: #fff;
}
.ms-match-hero__score-vs {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--fw-extrabold);
  color: rgba(255,255,255,0.7);
  letter-spacing: var(--ls-wider);
}

.ms-match-hero__status { margin-top: var(--space-1); }

.ms-match-hero__date {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ══════════════════════════════════════
   MATCH INFO CARD
   ══════════════════════════════════════ */
.ms-match-info-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-4);
}
.ms-match-info-card__icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: var(--text-lg);
  flex-shrink: 0;
}
.ms-match-info-card__label {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  margin-bottom: 2px;
}
.ms-match-info-card__value {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--color-heading);
}

/* ══════════════════════════════════════
   TEAM HERO
   ══════════════════════════════════════ */
.ms-team-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: var(--space-10) 0;
  color: #fff;
  position: relative;
}
.ms-team-hero__inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.ms-team-hero__badge {
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.95);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  box-shadow: var(--shadow-xl);
  flex-shrink: 0;
}
.ms-team-hero__badge img { width: 80px; height: 80px; object-fit: contain; }
.ms-team-hero__info { flex: 1; }
.ms-team-hero__name {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--fw-black);
  color: #fff;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-3);
}
.ms-team-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}
.ms-team-hero__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.7);
}

/* ══════════════════════════════════════
   STANDINGS TABLE (PREMIUM)
   ══════════════════════════════════════ */
.ms-standings-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.ms-standings-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  font-size: var(--text-sm);
}

.ms-standings-table thead tr {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}
.ms-standings-table thead th {
  padding: var(--space-3) var(--space-4);
  font-size: 10px;
  font-weight: var(--fw-extrabold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: rgba(255,255,255,0.9);
  background: transparent;
  border: none;
  text-align: center;
  white-space: nowrap;
}
.ms-standings-table thead th:first-child { text-align: left; padding-left: var(--space-5); }
.ms-standings-table thead th:nth-child(2) { text-align: left; }

.ms-standings-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}
.ms-standings-table tbody tr:last-child { border-bottom: none; }
.ms-standings-table tbody tr:hover { background: var(--color-surface-2); }

/* Zone highlighting */
.ms-standings-table tbody tr.zone-champions { border-left: 3px solid var(--color-success); }
.ms-standings-table tbody tr.zone-europe    { border-left: 3px solid var(--color-secondary); }
.ms-standings-table tbody tr.zone-relegation{ border-left: 3px solid var(--color-error); }

.ms-standings-table tbody td {
  padding: var(--space-3) var(--space-4);
  color: var(--color-text);
  border: none;
  text-align: center;
  vertical-align: middle;
}
.ms-standings-table tbody td:first-child {
  text-align: left;
  padding-left: var(--space-5);
  font-weight: var(--fw-bold);
  color: var(--color-heading);
  width: 36px;
}
.ms-standings-table .col-team {
  text-align: left;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.ms-standings-table .col-team img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}
.ms-standings-table .col-team-name {
  font-weight: var(--fw-semibold);
  color: var(--color-heading);
  white-space: nowrap;
}
.ms-standings-table .col-pts {
  font-weight: var(--fw-extrabold);
  color: var(--color-primary);
  font-size: var(--text-base);
}

/* ══════════════════════════════════════
   FIXTURE ROW CARD
   ══════════════════════════════════════ */
.ms-fixture-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  margin-bottom: var(--space-3);
}
.ms-fixture-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--color-primary-rgb), 0.2);
  transform: translateY(-1px);
}
.ms-fixture-card.is-live { border-color: var(--color-live); box-shadow: var(--shadow-live); }

.ms-fixture-card__team {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.ms-fixture-card__team--home { justify-content: flex-end; flex-direction: row-reverse; }
.ms-fixture-card__team--away { justify-content: flex-start; }
.ms-fixture-card__team-badge {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}
.ms-fixture-card__team-name {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--color-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-fixture-card__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}
.ms-fixture-card__score {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-black);
  color: var(--color-heading);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: var(--ls-tight);
}
.ms-fixture-card__score-box {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-1-5) var(--space-3);
  min-width: 80px;
  text-align: center;
}
.ms-fixture-card.is-live .ms-fixture-card__score-box {
  background: var(--color-live);
  border-color: var(--color-live);
  color: #fff;
}
.ms-fixture-card__vs {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: var(--color-text-muted);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
}
.ms-fixture-card__time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
}

/* ══════════════════════════════════════
   SPORTS ROUTE PAGES (Virtual routes)
   ══════════════════════════════════════ */
.ms-sports-page-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: var(--space-10) 0;
  color: #fff;
  margin-bottom: var(--space-8);
}
.ms-sports-page-header__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--fw-black);
  color: #fff;
  margin-bottom: var(--space-3);
}
.ms-sports-page-header__desc {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.7);
}

/* Sports tabs */
.ms-sports-tabs {
  display: flex;
  gap: 2px;
  background: var(--color-surface-2);
  padding: 3px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.ms-sports-tab {
  flex: 1;
  text-align: center;
  padding: var(--space-2-5) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  white-space: nowrap;
}
.ms-sports-tab.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.ms-sports-tab:hover:not(.is-active) { color: var(--color-heading); }

/* ══════════════════════════════════════
   HIGHLIGHT VIDEO CARD
   ══════════════════════════════════════ */
.ms-highlight-card {
  background: var(--color-accent-light);
  border: 1px solid #fde68a;
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.ms-highlight-card__icon { font-size: var(--text-2xl); }
.ms-highlight-card__text {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: #92400e;
}
.ms-highlight-card__btn {
  background: var(--color-accent-hover);
  color: #fff;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.ms-highlight-card__btn:hover { background: #b45309; color: #fff; }

/* ══════════════════════════════════════
   RESPONSIVE SPORTS
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  .ms-match-hero__teams { grid-template-columns: 1fr; gap: var(--space-4); }
  .ms-match-hero__center { order: -1; }
  .ms-team-hero__inner { flex-direction: column; text-align: center; }
  .ms-team-hero__meta { justify-content: center; }
  .ms-fixture-card { grid-template-columns: 1fr; text-align: center; }
  .ms-fixture-card__team--home { flex-direction: row; justify-content: center; }
  .ms-fixture-card__center { order: -1; }
}
