/* =====================================================
   GOALIADOR — Match Page Styles
   Live score hero · Timeline · Stats · Lineup pitch
   ===================================================== */

/* ─── Match Hero ─────────────────────────────────────── */
.gld-match-hero {
  background: linear-gradient(160deg, #060a14 0%, #0b1526 50%, #071410 100%);
  border-bottom: 1px solid rgba(22,163,74,.25);
  padding: 36px 0 0;
  position: relative;
  overflow: hidden;
}

.gld-match-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(22,163,74,.08) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 50%, rgba(59,130,246,.06) 0%, transparent 55%);
  pointer-events: none;
}

/* League / round badge row */
.gld-match-hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.gld-match-hero__league-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.gld-match-hero__league-name {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.gld-match-hero__round {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

/* Score row */
.gld-match-score-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* Team column */
.gld-match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.gld-match-team__logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.5));
  transition: transform .2s ease;
}

.gld-match-team__logo:hover { transform: scale(1.06); }

.gld-match-team__name {
  font-size: 18px;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.2;
}

/* Score centre */
.gld-match-score-centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.gld-match-score {
  font-size: 64px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gld-match-score__sep {
  font-size: 40px;
  color: rgba(255,255,255,.2);
  font-weight: 300;
  line-height: 1;
}

/* Status badge */
.gld-match-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  min-width: 80px;
  justify-content: center;
}

.gld-match-status--live {
  background: rgba(239,68,68,.2);
  border: 1px solid rgba(239,68,68,.5);
  color: #f87171;
}

.gld-match-status--live::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  animation: gld-pulse 1.2s ease-in-out infinite;
}

.gld-match-status--ht {
  background: rgba(245,158,11,.15);
  border: 1px solid rgba(245,158,11,.4);
  color: #fbbf24;
}

.gld-match-status--ft {
  background: rgba(100,116,139,.15);
  border: 1px solid rgba(100,116,139,.3);
  color: #94a3b8;
}

.gld-match-status--ns {
  background: rgba(22,163,74,.15);
  border: 1px solid rgba(22,163,74,.35);
  color: #4ade80;
}

/* Venue + date strip */
.gld-match-hero__info {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── Tab Navigation ────────────────────────────────── */
.gld-match-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.3);
}

.gld-match-tab {
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.gld-match-tab:hover { color: #e2e8f0; }

.gld-match-tab.active {
  color: #22c55e;
  border-bottom-color: #22c55e;
}

/* ─── Tab Panels ─────────────────────────────────────── */
.gld-tab-panel { display: none; padding: 28px 0; }
.gld-tab-panel.active { display: block; }

/* ─── Events Timeline ────────────────────────────────── */
.gld-timeline {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.gld-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(22,163,74,.3) 10%, rgba(22,163,74,.3) 90%, transparent);
  transform: translateX(-50%);
}

.gld-timeline-event {
  display: grid;
  grid-template-columns: 1fr 52px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  animation: gld-event-in .35s ease both;
}

@keyframes gld-event-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gld-timeline-event__left  { text-align: right; }
.gld-timeline-event__right { text-align: left; }

.gld-timeline-event__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.1);
}

.gld-ev-goal      { background: rgba(22,163,74,.25);  border-color: rgba(22,163,74,.6); }
.gld-ev-owngoal   { background: rgba(239,68,68,.2);   border-color: rgba(239,68,68,.5); }
.gld-ev-penalty   { background: rgba(245,158,11,.2);  border-color: rgba(245,158,11,.5); }
.gld-ev-yellow    { background: rgba(234,179,8,.2);   border-color: rgba(234,179,8,.5); }
.gld-ev-red       { background: rgba(239,68,68,.25);  border-color: rgba(239,68,68,.6); }
.gld-ev-sub       { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.4); }
.gld-ev-var       { background: rgba(100,116,139,.2); border-color: rgba(100,116,139,.4); }

.gld-timeline-event__minute {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  text-align: center;
  margin-top: 4px;
}

.gld-timeline-event__player {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

.gld-timeline-event__detail {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* KO / HT dividers */
.gld-timeline-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #334155;
}

.gld-timeline-divider::before,
.gld-timeline-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #1e2a3a;
}

.gld-timeline-divider span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #475569;
  white-space: nowrap;
}

/* ─── Stats Bars ─────────────────────────────────────── */
.gld-stats {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gld-stat-row {}

.gld-stat-row__label {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  margin-bottom: 6px;
}

.gld-stat-row__vals {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.gld-stat-row__val {
  font-size: 17px;
  font-weight: 900;
  color: #f1f5f9;
  min-width: 44px;
}

.gld-stat-row__val--home { text-align: left; }
.gld-stat-row__val--away { text-align: right; }

.gld-stat-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  gap: 2px;
}

.gld-stat-bar__home {
  height: 100%;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  transition: width .6s cubic-bezier(.4,0,.2,1);
  min-width: 2px;
}

.gld-stat-bar__away {
  height: 100%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width .6s cubic-bezier(.4,0,.2,1);
  min-width: 2px;
  margin-left: auto;
}

/* ─── Lineup Pitch ───────────────────────────────────── */
.gld-lineup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.gld-pitch-wrap {
  background: #161c27;
  border: 1px solid #1e2a3a;
  border-radius: 12px;
  overflow: hidden;
  padding: 16px;
}

.gld-pitch-wrap__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.gld-pitch-wrap__team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #f1f5f9;
}

.gld-pitch-wrap__team-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.gld-pitch-wrap__formation {
  font-size: 13px;
  font-weight: 700;
  color: #22c55e;
  background: rgba(22,163,74,.15);
  padding: 3px 10px;
  border-radius: 20px;
}

/* The actual pitch */
.gld-pitch {
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 48px,
      rgba(255,255,255,.025) 48px,
      rgba(255,255,255,.025) 49px
    ),
    linear-gradient(175deg, #0d2418 0%, #0f2d1e 50%, #0d2418 100%);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 12px 8px;
  min-height: 320px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Pitch markings */
.gld-pitch::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,.08);
  transform: translateX(-50%);
}

.gld-pitch__row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0;
  gap: 4px;
}

.gld-player-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
}

.gld-player-dot__circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(255,255,255,.3);
  transition: transform .15s;
  position: relative;
}

.gld-player-dot:hover .gld-player-dot__circle { transform: scale(1.2); }

.gld-player-dot--home .gld-player-dot__circle { background: #16a34a; }
.gld-player-dot--away .gld-player-dot__circle { background: #2563eb; }
.gld-player-dot--gk   .gld-player-dot__circle { background: #b45309; }

.gld-player-dot__name {
  font-size: 9px;
  color: rgba(255,255,255,.7);
  text-align: center;
  max-width: 52px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Subs list ──────────────────────────────────────── */
.gld-subs {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #1e2a3a;
}

.gld-subs__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #475569;
  margin-bottom: 10px;
}

.gld-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 12.5px;
}

.gld-sub-row:last-child { border-bottom: none; }
.gld-sub-row__number { color: #475569; font-weight: 700; min-width: 20px; font-size: 11px; }
.gld-sub-row__name   { color: #e2e8f0; flex: 1; }
.gld-sub-row__pos    { color: #64748b; font-size: 11px; }

/* ─── Match goals summary strip ─────────────────────── */
.gld-goal-events {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
  min-height: 24px;
}

.gld-goal-chip {
  background: rgba(22,163,74,.15);
  border: 1px solid rgba(22,163,74,.35);
  color: #4ade80;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  animation: gld-event-in .3s ease both;
}

.gld-goal-chip--away {
  background: rgba(59,130,246,.15);
  border-color: rgba(59,130,246,.35);
  color: #60a5fa;
}

/* ─── Head-to-head strip ─────────────────────────────── */
.gld-h2h {
  max-width: 580px;
  margin: 0 auto;
}

.gld-h2h-row {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 13px;
}

.gld-h2h-row__date  { color: #475569; font-size: 11px; }
.gld-h2h-row__score { text-align: center; font-weight: 800; color: #fff; font-size: 15px; letter-spacing: 1px; }
.gld-h2h-row__home  { text-align: right; color: #e2e8f0; font-weight: 600; }
.gld-h2h-row__away  { text-align: left; color: #e2e8f0; font-weight: 600; }

/* ─── Match post article (after recap) ──────────────── */
.gld-recap-body {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 32px;
  background: #161c27;
  border: 1px solid #1e2a3a;
  border-radius: 12px;
}

.gld-recap-body h2 {
  font-size: 20px;
  font-weight: 800;
  color: #f1f5f9;
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 3px solid #16a34a;
}

.gld-recap-body p {
  color: #cbd5e1;
  font-size: 15.5px;
  line-height: 1.75;
  margin-bottom: 16px;
}

.gld-recap-body strong { color: #f1f5f9; }

/* Goal item inside recap */
.gld-match-goals-list { margin-top: 20px; }
.gld-goal-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(22,163,74,.06);
  border-left: 3px solid #16a34a;
  border-radius: 0 6px 6px 0;
  margin-bottom: 6px;
  font-size: 14px;
  color: #e2e8f0;
}

/* ─── Match Page CTA strip ───────────────────────────── */
.gld-match-cta {
  text-align: center;
  padding: 24px;
  background: rgba(22,163,74,.06);
  border: 1px dashed rgba(22,163,74,.3);
  border-radius: 10px;
  margin: 24px 0;
}

.gld-match-cta p { margin: 0; color: #64748b; font-size: 14px; }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 700px) {
  .gld-match-team__logo  { width: 60px; height: 60px; }
  .gld-match-team__name  { font-size: 14px; }
  .gld-match-score       { font-size: 48px; }
  .gld-match-tab         { padding: 12px 16px; font-size: 12px; }

  .gld-timeline::before  { display: none; }
  .gld-timeline-event    { grid-template-columns: 1fr 40px 1fr; }
  .gld-timeline-event__icon { width: 34px; height: 34px; font-size: 15px; }

  .gld-lineup            { grid-template-columns: 1fr; }
  .gld-player-dot__circle { width: 28px; height: 28px; font-size: 10px; }
}

@media (max-width: 480px) {
  .gld-match-hero        { padding: 24px 0 0; }
  .gld-match-score       { font-size: 40px; letter-spacing: -1px; }
  .gld-match-score-row   { gap: 8px; }
}
