/* ==========================================================================
   MMO11 — MAÇ ÖZETİ VE DETAY MODALI (MATCH SUMMARY MODAL)
   Top Eleven Referanslı Beyaz ve Gri Tonlarında Modern Yönetim Paneli
   AGENTS.md §4.2 Pencere İçi Panel Kuralı:
   - absolute + inset: 0 (fixed DEĞİL)
   - Sıfır vh/vw (ölçüler %, px veya clamp)
   - Backdrop overlay tıklamasıyla kapanma
   - Sağ üst köşede ✕ butonu
   ========================================================================== */

.match-summary-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: msmFadeIn 0.2s ease-out;
}

@keyframes msmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.match-summary-dialog {
  background: #ffffff;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 900px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: msmSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes msmSlideUp {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Modal Üst Başlık Çubuğu */
.msm-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.msm-header-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #38bdf8;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.msm-header-sub {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  margin-left: 6px;
}

.btn-msm-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: all 0.15s ease;
}

.btn-msm-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Skorbord Banner (Hero) */
.msm-scoreboard-banner {
  background: linear-gradient(135deg, #090e1a 0%, #1e293b 100%);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  color: #ffffff;
  position: relative;
}

.msm-team-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.msm-team-box.home {
  justify-content: flex-start;
  text-align: left;
}

.msm-team-box.away {
  justify-content: flex-end;
  text-align: right;
  flex-direction: row-reverse;
}

.msm-team-logo-wrap {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.msm-team-info {
  display: flex;
  flex-direction: column;
}

.msm-team-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 2px;
}

.msm-team-box.away .msm-team-tag {
  color: #f59e0b;
}

.msm-team-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Skor Alanı */
.msm-score-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.msm-score-display {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 40px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.msm-score-val {
  min-width: 32px;
  text-align: center;
}

.msm-score-dash {
  color: #64748b;
  font-size: 32px;
}

.msm-match-badge-wrap {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.msm-match-status-badge {
  background: #22c55e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.msm-match-status-badge.live {
  background: #ef4444;
  animation: msmPulse 1.5s infinite;
}

@keyframes msmPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.msm-meta-text {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

/* Sekmeler Barı */
.msm-tabs-bar {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 8px 16px 0 16px;
  gap: 6px;
}

.msm-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.msm-tab-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.msm-tab-btn.active {
  background: #ffffff;
  color: #0284c7;
  border-color: #cbd5e1;
  border-bottom: 2px solid #ffffff;
  margin-bottom: -1.5px;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.04);
}

.msm-tab-btn .msm-tab-badge {
  background: #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

.msm-tab-btn.active .msm-tab-badge {
  background: #e0f2fe;
  color: #0369a1;
}

/* Sekme İçerik Alanı */
.msm-body-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  background: #ffffff;
}

/* 1. ÖNEMLİ ANLAR (TIMELINE) */
.msm-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.msm-timeline-container::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 50%;
  width: 2px;
  background: #e2e8f0;
  transform: translateX(-50%);
  z-index: 1;
}

.msm-event-row {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.msm-event-row.home {
  justify-content: flex-start;
}

.msm-event-row.away {
  justify-content: flex-end;
}

.msm-event-card {
  width: calc(50% - 28px);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: transform 0.15s ease;
}

.msm-event-row.home .msm-event-card {
  border-left: 4px solid #0ea5e9;
  text-align: left;
}

.msm-event-row.away .msm-event-card {
  border-right: 4px solid #f59e0b;
  text-align: right;
}

.msm-event-card.is-goal {
  background: #f0fdf4;
  border-color: #86efac;
}

.msm-event-row.home .msm-event-card.is-goal {
  border-left: 4px solid #22c55e;
}

.msm-event-row.away .msm-event-card.is-goal {
  border-right: 4px solid #22c55e;
}

.msm-event-card.is-red {
  background: #fef2f2;
  border-color: #fca5a5;
}

.msm-event-row.home .msm-event-card.is-red {
  border-left: 4px solid #ef4444;
}

.msm-event-row.away .msm-event-card.is-red {
  border-right: 4px solid #ef4444;
}

.msm-event-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.msm-event-row.away .msm-event-header {
  justify-content: flex-end;
}

.msm-event-icon {
  font-size: 16px;
}

.msm-event-player {
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
}

.msm-event-sub {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.msm-event-minute-circle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  z-index: 3;
}

.msm-event-row.is-goal .msm-event-minute-circle {
  border-color: #22c55e;
  color: #15803d;
  background: #f0fdf4;
}

.msm-event-row.is-red .msm-event-minute-circle {
  border-color: #ef4444;
  color: #b91c1c;
  background: #fef2f2;
}

/* 2. MAÇ İSTATİSTİKLERİ (STATS) */
.msm-stats-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.msm-stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msm-stat-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 13px;
}

.msm-stat-val-home {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 15px;
  color: #0284c7;
  min-width: 36px;
  text-align: left;
}

.msm-stat-title {
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.msm-stat-val-away {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 15px;
  color: #d97706;
  min-width: 36px;
  text-align: right;
}

.msm-stat-bars-wrap {
  display: flex;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
  gap: 2px;
}

.msm-stat-bar-fill-home {
  height: 100%;
  background: #0ea5e9;
  transition: width 0.3s ease;
  border-radius: 4px 0 0 4px;
}

.msm-stat-bar-fill-away {
  height: 100%;
  background: #f59e0b;
  transition: width 0.3s ease;
  border-radius: 0 4px 4px 0;
}

/* 3. KADROLAR VE OYUNCU PUANLARI (SQUADS) */
.msm-squads-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.msm-squad-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msm-squad-header {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  padding-bottom: 6px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.msm-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.msm-player-row:hover {
  background: #f1f5f9;
}

.msm-player-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.msm-player-pos-badge {
  background: #0f172a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 28px;
  text-align: center;
}

.msm-player-pos-badge.gk { background: #ca8a04; }
.msm-player-pos-badge.def { background: #2563eb; }
.msm-player-pos-badge.mid { background: #059669; }
.msm-player-pos-badge.att { background: #dc2626; }

.msm-player-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msm-player-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.msm-player-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.msm-player-rating-badge {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
}

.msm-player-rating-badge.high {
  background: #dcfce7;
  color: #15803d;
}

.msm-player-rating-badge.mid {
  background: #fef9c3;
  color: #854d0e;
}

.msm-player-rating-badge.low {
  background: #fee2e2;
  color: #991b1b;
}

/* Boş Durum (Empty State) */
.msm-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

.msm-empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.msm-empty-text {
  font-size: 14px;
  font-weight: 600;
}

/* Mobil / Küçük Ekran Uyumu */
@media (max-width: 640px) {
  .msm-scoreboard-banner {
    padding: 12px 14px;
  }
  .msm-team-name {
    font-size: 15px;
    max-width: 100px;
  }
  .msm-team-logo-wrap {
    width: 42px;
    height: 42px;
  }
  .msm-score-display {
    font-size: 28px;
  }
  .msm-squads-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
