/* ============================================================
   MATCH CARD — 100% Exact Image 3 Design & Smooth Motion
   Inspired by Reference UI Image 3:
   - Fixed, Clean Radar Sonar Network (No Scale Distortion)
   - Smooth Soft Opacity Glow Pulse & Flow Motion
   - Primary UI Theme Color Palette Integration
   - Header with Accent Bar, Tournament Title, Overs & Status Badge
   - Center Arena: Circular Team Badges in Ring Halo, Team Names & Scores
   - Center VS Badge with Overs Badge
   - Translucent Primary Banner: Info / Match Status Bar
   - Footer: Location Pin on Left, Safe Toss Pill + Action Button on Right
   ============================================================ */

.match-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;

  /* Glassmorphic theme background matching Image 3 */
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 246, 255, 0.92) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 14px rgba(59, 130, 246, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.03);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  min-height: 270px;
}

.match-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 24px -4px rgba(59, 130, 246, 0.15),
    0 16px 36px rgba(0, 0, 0, 0.05);
  border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .match-card {
  background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(17, 24, 39, 0.92) 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 6px 18px rgba(0, 0, 0, 0.35),
    0 18px 36px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .match-card:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 10px 28px rgba(59, 130, 246, 0.18),
    0 20px 40px rgba(0, 0, 0, 0.5);
}

/* ── Background SVG Art (Clean Image 3 Sonar Radar + Soft Flow Motion) ── */
.match-card__bg-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.match-card__bg-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Smooth Soft Opacity Pulse (No Geometric Distortion) */
.match-card__sonar-group {
  animation: mc-opacity-pulse 5s ease-in-out infinite;
}

@keyframes mc-opacity-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* ── Header Row ── */
.match-card__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 22px 10px 22px;
}

.match-card__head-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.match-card__accent-bar {
  width: 3.5px;
  height: 18px;
  background: var(--color-primary, #3b82f6);
  border-radius: 4px;
  margin-top: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.55);
}

.match-card__title-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.match-card__title-main {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .01em;
}

.match-card__overs-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-subtle);
  margin-top: 2px;
}

.match-card__head-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.match-card__title-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Status Badge Pill (SCHEDULED / LIVE / COMPLETED) */
.match-card__status {
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.match-card__status--upcoming {
  background: var(--color-primary-soft, #eff6ff);
  color: var(--color-primary, #2563eb);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
[data-theme="dark"] .match-card__status--upcoming {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.3);
}

.match-card__status--live {
  background: #fee2e2;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.match-card__status--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
  animation: mc-live-pulse 1.6s ease-in-out infinite;
}
@keyframes mc-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
[data-theme="dark"] .match-card__status--live {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.3);
}

.match-card__status--past {
  background: #d1fae5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
[data-theme="dark"] .match-card__status--past {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.3);
}

/* ── Center Arena Row (Teams & Scores) ── */
.match-card__arena {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  /* top-align so both teams' logos sit on the same line even when one team
     name wraps to two lines (keeps names + scores aligned too) */
  align-items: start;
  padding: 14px 22px;
  gap: 12px;
}

.match-card__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

/* Circular Team Logo Halo Ring */
.match-card__team-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(99, 102, 241, 0.12) 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.match-card:hover .match-card__team-ring {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.25);
}

.match-card__team-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-surface-2);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}
.match-card__team-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-card__team-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-top: 2px;
  /* fixed 2-line box: 1-line and 2-line names take the same height, so the
     score below stays aligned across both teams */
  min-height: 2.4em;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-card__team-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--color-text);
}
.match-card__team-score--empty {
  color: var(--color-text-subtle);
  font-weight: 700;
  font-size: 18px;
}

/* Center VS Badge */
.match-card__centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  /* nudge down so the VS badge lines up with the centre of the 64px logo rings
     (arena is now top-aligned) */
  margin-top: 10px;
}

.match-card__vs-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px stroke/dashed rgba(59, 130, 246, 0.3);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--color-primary, #2563eb);
}
[data-theme="dark"] .match-card__vs-badge {
  background: rgba(30, 41, 59, 0.85);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.3);
}

.match-card__overs-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-subtle);
}

/* ── Translucent Info / Scheduled Match Banner Bar ── */
.match-card__info {
  position: relative;
  z-index: 1;
  margin: 6px 22px 12px 22px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--color-primary-soft, rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.16);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary, #1d4ed8);
}
[data-theme="dark"] .match-card__info {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(96, 165, 250, 0.25);
  color: #93c5fd;
}
.match-card__info-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-primary, #2563eb);
}

/* ── Footer Row ── */
.match-card__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px 18px 22px;
  margin-top: auto;
}

.match-card__location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.match-card__location svg {
  width: 14px;
  height: 14px;
  color: var(--color-text-subtle);
  flex-shrink: 0;
}

.match-card__footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-card__toss-pill {
  padding: 5px 12px;
  border-radius: 10px;
  background: var(--color-primary-soft, rgba(59, 130, 246, 0.08));
  color: var(--color-primary, #2563eb);
  font-size: 11px;
  font-weight: 700;
}
[data-theme="dark"] .match-card__toss-pill {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.match-card__action-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border);
  display: grid;
  place-items: center;
  color: var(--color-primary, #2563eb);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
[data-theme="dark"] .match-card__action-btn {
  background: rgba(30, 41, 59, 0.8);
  color: #93c5fd;
}
.match-card__action-btn:hover {
  transform: scale(1.08);
  background: var(--color-primary-soft, #eff6ff);
  border-color: rgba(59, 130, 246, 0.35);
}
.match-card__action-btn svg {
  width: 15px;
  height: 15px;
}

/* ── Responsive adjustments ── */
@media (max-width: 480px) {
  .match-card__header {
    padding: 14px 16px 8px 16px;
  }
  .match-card__arena {
    padding: 10px 16px;
  }
  .match-card__info {
    margin: 6px 16px 10px 16px;
    padding: 8px 12px;
    font-size: 12px;
  }
  .match-card__footer {
    padding: 8px 16px 14px 16px;
  }
  .match-card__team-ring {
    width: 52px;
    height: 52px;
  }
  .match-card__vs-badge {
    width: 36px;
    height: 36px;
    font-size: 11px;
  }
}