:root {
  color-scheme: dark light;
  /* Modern Color Palette */
  --bg-primary: #0a0e1a;
  --bg-secondary: #131824;
  --bg-card: rgba(19, 24, 36, 0.85);
  --bg-glass: rgba(25, 32, 48, 0.7);
  --border-primary: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.15);
  
  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #818cf8;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-yellow: #f59e0b;
  --accent-blue: #3b82f6;
  
  /* Goal & Card Colors */
  --goal-glow: rgba(16, 185, 129, 0.3);
  --card-yellow: #fbbf24;
  --card-red: #ef4444;
  
  /* Shadows & Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glow-goal: 0 0 20px rgba(16, 185, 129, 0.4);
  --glow-live: 0 0 15px rgba(239, 68, 68, 0.5);
  
  /* Spacing */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', sans-serif;
  background: linear-gradient(135deg, #0a0e1a 0%, #131824 50%, #0f1419 100%);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow-y: visible;
}

.page {
  width: min(1200px, 96%);
  padding: var(--space-xl) var(--space-lg) 48px;
}

/* ============================================
   MATCH HEADER - Professional Design
   ============================================ */

.match-header {
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.12) 0%, 
    rgba(139, 92, 246, 0.08) 50%,
    rgba(59, 130, 246, 0.12) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.match-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent);
}

.match-status-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Status variants */
.status-tag.status-live {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  box-shadow: var(--glow-live);
}

.status-tag.status-halftime {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.status-tag.status-finished {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.status-tag.status-soon {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.status-tag.status-notstarted {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.status-tag.status-postponed {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.status-tag.status-canceled {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.match-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.match-info-badge .icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.match-scoreboard {
  display: grid;
  grid-template-columns: 1fr max-content 1fr; /* skor daima ortada */
  align-items: center;
  gap: var(--space-lg);
  overflow: visible; /* logo kırpılmasın */
  padding-inline: clamp(12px, 3vw, 24px); /* logolar kenara yapışmasın */
}

.team {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  justify-self: end; /* sol takım merkeze doğru hizalansın */
}

.team-away {
  justify-content: flex-end;
  justify-self: start; /* sağ takım merkeze doğru hizalansın */
}

.team-logo {
  width: 64px;
  height: 64px;
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
  overflow: visible;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.team-logo:hover {
  transform: scale(1.05);
}

.team-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-info-right {
  align-items: flex-end;
  text-align: right;
}

.team-name {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.team-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.15),
    rgba(139, 92, 246, 0.15));
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  justify-self: center; /* her durumda tam merkez */
}

.score-numbers {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-separator {
  opacity: 0.4;
  font-weight: 400;
}

/* ============================================
   TIMELINE - Modern Event Cards
   ============================================ */

.layout {
  margin-bottom: var(--space-xl);
}

.timeline {
  background: var(--bg-glass);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

.timeline h2 {
  margin: 0 0 var(--space-lg);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.timeline h2::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-full);
}

.timeline-events {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.event-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, 
    rgba(99, 102, 241, 0.5), 
    rgba(139, 92, 246, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.event-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(4px);
}

.event-card:hover::before {
  opacity: 1;
}

/* Goal Event Styling */
.event-card.goal {
  background: linear-gradient(135deg, 
    rgba(16, 185, 129, 0.08) 0%,
    rgba(16, 185, 129, 0.02) 100%);
  border-color: rgba(16, 185, 129, 0.3);
}

.event-card.goal::before {
  background: linear-gradient(180deg, 
    rgba(16, 185, 129, 0.8), 
    rgba(16, 185, 129, 0.4));
  opacity: 1;
}

.event-card.goal:hover {
  box-shadow: var(--glow-goal);
}

/* Card Event Styling */
.event-card.card {
  background: linear-gradient(135deg, 
    rgba(251, 191, 36, 0.06) 0%,
    rgba(251, 191, 36, 0.02) 100%);
  border-color: rgba(251, 191, 36, 0.2);
}

.event-card.card::before {
  background: linear-gradient(180deg, 
    rgba(251, 191, 36, 0.8), 
    rgba(251, 191, 36, 0.4));
  opacity: 1;
}

/* Match Event Styling (Maç başladı / bitti) */
.event-card.match-event {
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.08) 0%,
    rgba(99, 102, 241, 0.02) 100%);
  border-color: rgba(99, 102, 241, 0.3);
}

.event-card.match-event::before {
  background: linear-gradient(180deg, 
    rgba(99, 102, 241, 0.8), 
    rgba(99, 102, 241, 0.4));
  opacity: 1;
}

.event-icon.match-event {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

.event-icon.match-event svg {
  color: var(--accent-primary);
}

/* ============================================
   LINEUP EVENT (Kadro Açıklandı)
   ============================================ */

.event-card.lineup-event {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.08) 0%,
    rgba(59, 130, 246, 0.02) 100%);
  border-color: rgba(59, 130, 246, 0.3);
}

.event-card.lineup-event::before {
  background: linear-gradient(180deg, 
    rgba(59, 130, 246, 0.8), 
    rgba(59, 130, 246, 0.4));
  opacity: 1;
}

.event-icon.lineup-event {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.event-icon.lineup-event svg {
  color: #3b82f6;
}

.event-card.lineup-event .event-title {
  color: #1e3a8a;
  font-weight: 700;
}

/* ============================================
   COUNTDOWN EVENT (Maça X dk kala)
   ============================================ */

.event-card.countdown-event {
  background: linear-gradient(135deg, 
    rgba(245, 158, 11, 0.08) 0%,
    rgba(245, 158, 11, 0.02) 100%);
  border-color: rgba(245, 158, 11, 0.3);
}

.event-card.countdown-event::before {
  background: linear-gradient(180deg, 
    rgba(245, 158, 11, 0.8), 
    rgba(245, 158, 11, 0.4));
  opacity: 1;
}

.event-icon.countdown-event {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

.event-icon.countdown-event svg {
  color: #f59e0b;
}

.event-card.countdown-event .event-title {
  color: #d97706;
  font-weight: 700;
  font-size: 1.05rem;
}

.event-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  min-width: 60px;
}

.event-minute {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  padding: 4px 12px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.event-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-primary);
}

.event-icon svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.event-icon.goal {
  background: linear-gradient(135deg, 
    rgba(16, 185, 129, 0.2), 
    rgba(16, 185, 129, 0.1));
  border-color: rgba(16, 185, 129, 0.3);
}

.event-icon.goal svg {
  color: var(--accent-green);
}

.event-icon.card svg {
  color: var(--card-yellow);
}

.event-icon.substitution {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.event-icon.substitution svg {
  color: var(--accent-blue);
}

.event-content {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
  line-height: 1.6;
}

/* Gol skoru için özel stil - profesyonel ve temiz */
.goal-score {
  font-size: 1.15rem;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.3px;
}

/* Oyuncu değişikliği için özel stil */
.event-card.substitution .event-title {
  line-height: 1.8;
}

.event-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ============================================
   STATISTICS & TOP PLAYERS
   ============================================ */

.match-stats,
.top-players {
  background: var(--bg-glass);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-xl);
}

.match-stats h2,
.top-players h2 {
  margin: 0 0 var(--space-lg);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.match-stats h2::before,
.top-players h2::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-full);
}

.stats-grid {
  display: grid;
  gap: var(--space-lg);
}

.stat-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.stat-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateX(2px);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: var(--space-sm);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  text-align: center;
  flex: 1;
}

.stat-team-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.stat-team-home {
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.stat-team-away {
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-values {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.stat-home,
.stat-away {
  min-width: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.stat-home {
  text-align: right;
}

.stat-away {
  text-align: left;
}

.stat-bar-container {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-bar {
  display: flex;
  height: 100%;
  border-radius: var(--radius-full);
}

.stat-bar-home {
  background: linear-gradient(90deg, 
    #6366f1 0%, 
    #8b5cf6 100%);
  border-radius: var(--radius-full) 0 0 var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.stat-bar-home::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.2), 
    transparent);
  border-radius: var(--radius-full) 0 0 0;
}

.stat-bar-away {
  background: linear-gradient(90deg, 
    #3b82f6 0%, 
    #6366f1 100%);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.stat-bar-away::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.2), 
    transparent);
  border-radius: 0 var(--radius-full) 0 0;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.player-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.player-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, 
    rgba(16, 185, 129, 0.8), 
    rgba(16, 185, 129, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.player-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.player-card:hover::before {
  opacity: 1;
}

.player-rank {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-primary);
  opacity: 0.5;
  min-width: 40px;
  text-align: center;
}

.player-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-glow);
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.2), 
    rgba(139, 92, 246, 0.2));
  box-shadow: var(--shadow-md);
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-team {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.player-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, 
    rgba(16, 185, 129, 0.2), 
    rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-green);
}

/* ============================================
   TABS - PROFESSIONAL UX/UI
   ============================================ */

.tabs-container {
  background: var(--bg-glass);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-xl);
  overflow: visible; /* sticky başlık için kapatma */
}

.tabs-header {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid var(--border-primary);
  position: sticky; /* sticky sekme */
  top: 0; /* iframe içinde widget üstüne yapışır */
  z-index: 30;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.tab-btn:hover {
  background: rgba(16, 185, 129, 0.08);
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
}

.tab-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.tab-label {
  line-height: 1;
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  left: 8px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-green), #059669);
  border-radius: 3px 3px 0 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.tabs-content {
  position: relative;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sub Tabs (Kadrolar içinde) */
.lineups-sub-tabs {
  display: flex;
  gap: 12px;
  padding: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-primary);
  background: rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(8px);
}

.sub-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.sub-tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.sub-tab-btn:hover::before {
  left: 100%;
}

.sub-tab-btn:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.sub-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-green), #059669);
  border-color: var(--accent-green);
  color: white;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transform: translateY(0);
}

.sub-tab-icon {
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.sub-tab-label {
  line-height: 1;
  font-weight: 600;
}

.lineups-sub-content {
  padding: var(--space-xl);
  min-height: 400px;
}

.lineups-content {
  padding: var(--space-xl);
}

.sub-tab-pane {
  display: none;
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-tab-pane.active {
  display: block;
}

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

/* Lineups Content Improvements */
.lineups-starting11-content,
.lineups-bench-content {
  animation: fadeInUp 0.4s ease-out;
}

/* No Data Container */
.no-data-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: var(--space-xl);
}

.no-data {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-primary);
}

/* ============================================
   H2H (Baş Başa) - Professional List
   ============================================ */
.h2h-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin: 10px 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.h2h-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.h2h-top {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  padding-bottom: 8px;
}

.h2h-league {
  font-weight: 600;
}

.h2h-middle {
  display: grid;
  grid-template-columns: 1fr max-content 1fr; /* skor tam ortada kalır */
  align-items: center;
  gap: 12px;
}

.h2h-side {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.h2h-home { justify-self: start; }
.h2h-away { justify-self: end; }
.h2h-scorebox { justify-self: center; }

.h2h-name {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.h2h-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

.h2h-scorebox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}

.h2h-score-num {
  font-size: 1.1rem;
  font-weight: 800;
}

.h2h-score-sep {
  opacity: 0.5;
}

.h2h-item.home-win .h2h-home .h2h-name { color: var(--accent-green); }
.h2h-item.away-win .h2h-away .h2h-name { color: var(--accent-green); }
.h2h-item.draw .h2h-scorebox { border-color: rgba(255,255,255,0.18); }

.h2h-item.home-win .h2h-scorebox {
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.06));
  border-color: rgba(16,185,129,0.35);
}

.h2h-item.away-win .h2h-scorebox {
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(59,130,246,0.06));
  border-color: rgba(59,130,246,0.35);
}

.h2h-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,255,255,0.16);
}

/* Players List Grid Improvements */
.players-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  animation: fadeInUp 0.4s ease-out;
}

.team-players-list {
  background: var(--bg-glass);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-players-list:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(16, 185, 129, 0.3);
}

.team-players-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-primary);
}

.team-players-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.team-players-header h3 {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.team-players-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.position-group {
  margin-bottom: var(--space-lg);
}

.position-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-full);
  display: inline-block;
}

.players-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-sm);
}

.player-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: default;
}

.player-list-item:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateX(4px);
}

.player-list-number {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-green);
  min-width: 24px;
  text-align: center;
}

.player-list-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive Sub-tabs */
@media (max-width: 768px) {
  .lineups-sub-tabs {
    gap: 8px;
    padding: var(--space-md);
  }

  .sub-tab-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
    gap: 6px;
  }

  .sub-tab-label {
    font-size: 0.85rem;
  }

  .sub-tab-icon {
    font-size: 1rem;
  }

  .lineups-sub-content {
    padding: var(--space-lg);
    min-height: 300px;
  }

  .players-list-grid {
    grid-template-columns: 1fr;
  }
}

/* Timeline inside tab */
#tab-timeline .timeline {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: var(--space-xl);
  box-shadow: none;
}

#tab-timeline .timeline h2 {
  display: none; /* Başlık zaten tab'da var */
}

/* ============================================
   LINEUPS (KADROLAR) - MÜKEMMEL UX/UI
   ============================================ */

.lineups-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.lineup-team {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #ffffff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.lineup-team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid #e2e8f0;
}

.lineup-team-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.lineup-team-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: var(--space-md);
}

.lineup-team-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.lineup-formation-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.formation-field {
  background: 
    radial-gradient(circle at 20% 30%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(5, 150, 105, 0.15) 0%, transparent 50%),
    linear-gradient(180deg, #0ea673 0%, #10b981 50%, #0ea673 100%);
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: var(--space-lg);
  min-height: 520px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    inset 0 2px 40px rgba(0, 0, 0, 0.2),
    inset 0 0 100px rgba(0, 0, 0, 0.1);
}

/* Profesyonel saha çizgileri */
.formation-field::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.4) 20%, 
    rgba(255, 255, 255, 0.4) 80%, 
    transparent 100%
  );
  transform: translateY(-50%);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.formation-field::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 
    0 0 20px rgba(255, 255, 255, 0.25),
    inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.formation-row {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(90px, 1fr));
  justify-content: center;
  justify-items: center;
  align-items: center;
  gap: 10px;
  width: var(--row-w, 100%);
  margin: 0 auto;
  z-index: 1;
  animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.formation-row:nth-child(1) { animation-delay: 0.15s; }
.formation-row:nth-child(2) { animation-delay: 0.25s; }
.formation-row:nth-child(3) { animation-delay: 0.35s; }
.formation-row:nth-child(4) { animation-delay: 0.45s; }

.formation-player {
  background: transparent; /* Kartlı görünüm kapalı (desktop dahil) */
  border-radius: 8px;
  padding: 6px 8px;
  box-shadow: none;
  min-width: 90px;
  max-width: 140px;
  text-align: center;
  transition: transform 0.2s ease;
  cursor: default;
  position: relative;
  border: 0;
  box-sizing: border-box;
  margin: 2px;
}

.formation-player::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  background: linear-gradient(135deg, 
    rgba(16, 185, 129, 0.8), 
    rgba(5, 150, 105, 0.8)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.formation-player:hover {
  transform: translateY(-10px) scale(1.08);
  box-shadow: 
    0 16px 40px rgba(16, 185, 129, 0.4),
    0 8px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  border-color: #10b981;
}

.formation-player:hover::before {
  opacity: 0.15;
}

.formation-player-jersey {
  margin: 0 auto 6px;
  width: 48px;
  height: 48px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-weight: 900;
  font-size: 0.95rem;
  text-shadow: 0 1px 1px rgba(255,255,255,0.7);
  z-index: 1; /* sayı üstte kalsın */
}

.formation-player-jersey::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<?xml version='1.0' encoding='UTF-8'?><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path fill='%23ffffff' stroke='%23000000' stroke-opacity='0.08' d='M22 8l10 4 10-4 8 8-6 6v26a4 4 0 0 1-4 4H24a4 4 0 0 1-4-4V22l-6-6 8-8z'/></svg>") center/contain no-repeat;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.25));
  z-index: 0;
  pointer-events: none;
}

.formation-player-jersey::after {
  content: attr(data-num);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #0f172a;
  font-weight: 900;
  font-size: 0.95rem;
  text-shadow: 0 1px 1px rgba(255,255,255,0.7);
  z-index: 2;
  pointer-events: none;
}

.formation-player-jersey.gk::before {
  background: url("data:image/svg+xml;utf8,<?xml version='1.0' encoding='UTF-8'?><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path fill='%23ffd400' stroke='%23000000' stroke-opacity='0.08' d='M22 8l10 4 10-4 8 8-6 6v26a4 4 0 0 1-4 4H24a4 4 0 0 1-4-4V22l-6-6 8-8z'/></svg>") center/contain no-repeat;
}

.formation-player-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e6fffa;
  line-height: 1.25;
  max-width: min(140px, 34vw);
  opacity: 0.0;
  transition: opacity 0.2s ease;
}

.formation-player:hover .formation-player-name { opacity: 1; }

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

/* ============================================
   PLAYERS LIST (İlk 11 & Yedekler)
   ============================================ */

.players-list-grid {
  display: grid;
    grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.team-players-list {
  background: var(--bg-glass);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.team-players-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.05));
  border-bottom: 1px solid var(--border-primary);
}

.team-players-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.team-players-header h3 {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.team-players-count {
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-green);
}

.players-by-position {
  padding: var(--space-md);
}

.position-group {
  margin-bottom: var(--space-lg);
}

.position-group:last-child {
  margin-bottom: 0;
}

.position-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-green);
  margin-bottom: var(--space-sm);
  padding-left: var(--space-xs);
}

.players-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-sm);
}

.player-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: default;
}

.player-list-item:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--accent-green);
  transform: translateX(4px);
}

.player-list-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-green), #059669);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.player-list-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .page {
    padding: var(--space-md) var(--space-sm) 32px;
  }

  .match-header {
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
  }

  /* Tabs responsive */
  .tab-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .tab-icon {
    font-size: 1.1rem;
  }

  .lineups-sub-tabs {
    padding: var(--space-md);
    gap: 6px;
  }

  .sub-tab-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .lineups-content {
    padding: var(--space-lg);
  }

  #tab-timeline .timeline {
    padding: var(--space-lg);
  }

  .players-group {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .player-list-number {
    min-width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .player-list-name {
    font-size: 0.8rem;
  }

  .match-status-bar {
    gap: 8px;
    margin-bottom: var(--space-md);
  }

  .status-tag {
    padding: 6px 12px;
    font-size: 0.7rem;
  }

  .match-info-badge {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .match-info-badge .icon {
    width: 12px;
    height: 12px;
  }

  .match-scoreboard {
    grid-template-columns: max-content 1fr max-content;
    justify-items: start;
    gap: var(--space-sm);
  }

  .team-logo {
    width: 48px;
    height: 48px;
  }

  .team-name {
    font-size: 0.95rem;
  }

  .team-label {
    font-size: 0.65rem;
  }

  .score-display {
    padding: var(--space-sm) var(--space-md);
  }

  .score-numbers {
    font-size: 2rem;
  }

  .timeline,
  .match-stats,
  .top-players,
  .lineups-section {
    padding: var(--space-md);
  }

  .timeline h2,
  .match-stats h2,
  .top-players h2,
  .lineups-section h2 {
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
  }

  .lineups-section {
    padding: var(--space-lg);
  }

  .lineup-team-header {
    padding: var(--space-md) var(--space-lg);
  }

  .lineup-team-logo {
    width: 48px;
    height: 48px;
  }

  .lineup-team-header h3 {
    font-size: 1.1rem;
  }

  .lineup-formation-label {
    font-size: 0.75rem;
  }

  .formation-field {
    min-height: 460px;
    padding: var(--space-lg) var(--space-md);
    gap: var(--space-md);
  }

  .formation-player {
    min-width: 95px;
    max-width: 130px;
    padding: 14px 16px;
  }

  .formation-player-jersey {
    font-size: 0.9rem;
    padding: 5px 12px;
    margin-bottom: 8px;
  }

  .formation-player-name {
    font-size: 0.8rem;
  }

  .event-card {
    padding: var(--space-sm);
    gap: var(--space-sm);
  }

  .event-left {
    min-width: 48px;
  }

  .event-minute {
    font-size: 0.8rem;
    padding: 3px 8px;
  }

  .event-icon {
    width: 26px;
    height: 26px;
  }

  .event-icon svg {
    width: 15px;
    height: 15px;
  }

  .event-title {
    font-size: 0.85rem;
  }

  .goal-score {
    font-size: 1.05rem;
  }

  .event-description {
    font-size: 0.8rem;
  }

  .stat-row {
    padding: var(--space-sm);
  }

  .stat-home,
  .stat-away {
    min-width: 40px;
    font-size: 0.95rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .stat-team-label {
    font-size: 0.58rem;
    padding: 3px 6px;
    max-width: 90px;
  }

  .stat-bar-container {
    height: 8px;
  }

  .players-grid {
    grid-template-columns: 1fr;
  }

  .player-card {
    padding: var(--space-sm);
    gap: var(--space-sm);
  }

  .player-photo {
    width: 52px;
    height: 52px;
  }

  .player-rank {
    font-size: 1.5rem;
    min-width: 36px;
  }

  .player-name {
    font-size: 0.85rem;
  }

  .player-team {
    font-size: 0.7rem;
  }

  .player-rating {
    min-width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  :root {
    --logo-size-mobile: clamp(28px, 9vw, 40px);
  }
  .page {
    padding: var(--space-sm) 8px 24px;
  }

  .match-header {
    padding: var(--space-sm);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    /* Mobilde deplasman logosu kenarda kırpılmasın */
    overflow: visible;
    padding-inline: calc(var(--logo-size-mobile) / 1.5);
    box-sizing: border-box;
  }

  .match-status-bar {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-sm);
  }

  .status-tag {
    padding: 5px 10px;
    font-size: 0.65rem;
  }

  .live-dot {
    width: 6px;
    height: 6px;
  }

  .match-info-badge {
    padding: 4px 8px;
    font-size: 0.65rem;
  }

  .match-info-badge .icon {
    width: 11px;
    height: 11px;
  }

  .match-scoreboard {
    /* Yan kolonlar shrink edilebilir, skor ortada */
    grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Grid çocukları shrink edebilsin (ellipsis çalışsın) */
  .match-scoreboard > * { min-width: 0; }

  /* Takım bloklarındaki yatay boşluğu azalt */
  .team {
    gap: 6px;
    min-width: 0;
    overflow: hidden;
  }

  .team-info { min-width: 0; overflow: hidden; }
  .team-info-right { min-width: 0; }

  /* Deplasman takımını da skora yaklaştır */
  .team-away {
    justify-content: flex-start;
  }

  /* Skor bloğunun sol iç boşluğunu sıfırla */
  .score-display {
    padding: 6px 8px;
  }

  .team-logo {
    width: var(--logo-size-mobile);
    height: var(--logo-size-mobile);
    max-width: 100%;
  }

  .team-name {
    font-size: 0.85rem;
  }

  .team-label {
    font-size: 0.6rem;
  }

  /* Uzun takım adlarında taşmayı engelle */
  .team-name, .team-label {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .score-display {
    padding: 8px 12px;
  }

  .score-numbers {
    font-size: 1.8rem;
    gap: 8px;
  }

  .score-separator {
    font-size: 1.4rem;
  }

  /* Tabs responsive */
  .tab-btn {
    padding: 10px 12px;
    font-size: 0.85rem;
    flex-direction: column;
    gap: 4px;
  }

  .tab-icon {
    font-size: 1rem;
  }

  .tab-label {
    font-size: 0.75rem;
  }

  .lineups-sub-tabs {
    padding: var(--space-sm);
    gap: 4px;
    flex-wrap: wrap;
  }

  .sub-tab-btn {
    padding: 7px 14px;
    font-size: 0.75rem;
  }

  .lineups-content {
    padding: var(--space-md);
  }

  #tab-timeline .timeline {
    padding: var(--space-md);
  }

  .players-group {
    grid-template-columns: 1fr;
  }

  .player-list-number {
    min-width: 26px;
    height: 26px;
    font-size: 0.7rem;
  }

  .player-list-name {
    font-size: 0.75rem;
  }

  .timeline,
  .match-stats,
  .top-players,
  .tabs-container {
    padding: var(--space-sm);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
  }

  .timeline h2,
  .match-stats h2,
  .top-players h2 {
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
  }

  .timeline h2::before,
  .match-stats h2::before,
  .top-players h2::before {
    width: 3px;
    height: 16px;
  }

  .lineups-section {
    padding: var(--space-md);
  }

  .lineup-team-header {
    padding: var(--space-sm) var(--space-md);
  }

  .lineup-team-logo {
    width: 42px;
    height: 42px;
  }

  .lineup-team-header h3 {
    font-size: 1rem;
  }

  .lineup-formation-label {
    font-size: 0.7rem;
  }

  .formation-field {
    min-height: 400px;
    padding: 10px 6px; /* daha sıkı padding - saha alanı büyüsün */
    padding-left: max(var(--space-sm), env(safe-area-inset-left));
    padding-right: max(var(--space-sm), env(safe-area-inset-right));
    gap: var(--space-sm);
  }
  /* Formation rows use centered grid on small screens */
  .formation-row {
    grid-template-columns: repeat(var(--cols, 3), minmax(54px, 1fr));
    width: min(100%, 98%);
    gap: 4px;
    padding: 0 4px;
    max-width: 98%;
    margin: 0 auto;
  }

  .formation-player {
    min-width: 66px;
    max-width: 96px;
    padding: 8px 10px;
    /* Scale cards to viewport to avoid overflow */
    max-width: 30vw;
    margin: 2px;
    /* KOMPAKT MOD (kart kaldır, sadece metin) */
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 8px;
    display: flex;
    flex-direction: column; /* Numara üstte, isim altta */
    align-items: center;
    justify-content: center;
    min-height: 40px; /* dokunma alanı */
  }

  .formation-player-jersey {
    font-size: 0.7rem;
    padding: 2px 6px;
    margin: 0 0 4px 0; /* üstte, altında isim */
    border-radius: 999px;
  }

  .formation-player-name {
    font-size: 0.66rem;
    line-height: 1.18;
    font-weight: 700;
    color: #0f172a;
    max-width: 28vw; /* metni biraz daha sıkıştır */
    letter-spacing: -0.35px;
    word-break: break-word;
  }

  .event-card {
    padding: 10px;
    gap: 10px;
    border-radius: 10px;
  }

  .event-left {
    min-width: 44px;
    gap: 6px;
  }

  .event-minute {
    font-size: 0.75rem;
    padding: 2px 6px;
  }

  .event-icon {
    width: 24px;
    height: 24px;
  }

  .event-icon svg {
    width: 14px;
    height: 14px;
  }

  .event-title {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .goal-score {
    font-size: 0.95rem;
  }

  .event-description {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .stat-row {
    padding: 10px;
    gap: 8px;
  }

  .stat-header {
    gap: 4px;
    margin-bottom: 6px;
  }

  .stat-label {
    font-size: 0.6rem;
  }

  .stat-team-label {
    font-size: 0.55rem;
    padding: 2px 5px;
    max-width: 75px;
  }

  .stat-values {
    gap: 10px;
  }

  .stat-home,
  .stat-away {
    min-width: 35px;
    font-size: 0.9rem;
  }

  .stat-bar-container {
    height: 7px;
  }

  .player-card {
    padding: 10px;
    gap: 10px;
  }

  .player-rank {
    font-size: 1.3rem;
    min-width: 28px;
  }

  .player-photo {
    width: 44px;
    height: 44px;
  }

  .player-name {
    font-size: 0.8rem;
  }

  .player-team {
    font-size: 0.65rem;
  }

  .player-rating {
    min-width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }
}

/* Extra small screens (iPhone SE, small phones) */
@media (max-width: 375px) {
  .page {
    padding: 8px 6px 20px;
  }

  .team-logo {
    width: clamp(24px, 10vw, 36px);
    height: clamp(24px, 10vw, 36px);
  }

  .team-name {
    font-size: 0.8rem;
  }

  .score-numbers {
    font-size: 1.6rem;
  }

  .event-card {
    padding: 8px;
    gap: 8px;
  }

  .event-left {
    min-width: 40px;
  }

  .event-title {
    font-size: 0.75rem;
  }

  .goal-score {
    font-size: 0.9rem;
  }

  .event-description {
    font-size: 0.7rem;
  }

  /* Tabs responsive */
  .tab-btn {
    padding: 8px 10px;
    font-size: 0.8rem;
    gap: 2px;
  }

  .tab-icon {
    font-size: 0.9rem;
  }

  .tab-label {
    font-size: 0.7rem;
  }

  .lineups-sub-tabs {
    gap: 3px;
  }

  .sub-tab-btn {
    padding: 6px 12px;
    font-size: 0.7rem;
  }

  .lineups-content {
    padding: var(--space-sm);
  }

  #tab-timeline .timeline {
    padding: var(--space-sm);
  }

  .player-list-number {
    min-width: 24px;
    height: 24px;
    font-size: 0.65rem;
  }

  .player-list-name {
    font-size: 0.7rem;
  }

  .tabs-container {
    padding: var(--space-xs);
  }

  .lineup-team-header {
    padding: 12px 14px;
  }

  .lineup-team-logo {
    width: 38px;
    height: 38px;
  }

  .lineup-team-header h3 {
    font-size: 0.95rem;
  }

  .lineup-formation-label {
    font-size: 0.65rem;
  }

  .formation-field {
    min-height: 360px;
    padding: var(--space-md) 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    gap: 12px;
  }
  /* Tighter centered grid on very small phones */
  .formation-row {
    grid-template-columns: repeat(var(--cols, 3), minmax(74px, 1fr));
    width: var(--row-w, 100%);
    gap: 6px;
    padding: 0 6px;
    max-width: 96%;
    margin: 0 auto;
  }

  .formation-player {
    min-width: 64px;
    max-width: 88px;
    padding: 7px 9px;
    max-width: 42vw;
    margin: 2px;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 36px;
  }

  .formation-player-jersey {
    font-size: 0.65rem;
    padding: 2px 6px;
    margin: 0 0 4px 0;
    border-radius: 999px;
  }

  .formation-player-name {
    font-size: 0.65rem;
    line-height: 1.15;
    font-weight: 700;
    color: #0f172a;
  }

  .stat-team-label {
    font-size: 0.5rem;
    padding: 2px 4px;
    max-width: 65px;
  }

  .stat-home,
  .stat-away {
    min-width: 32px;
    font-size: 0.85rem;
  }
}

/* ============================================
   ANIMATIONS & EFFECTS
   ============================================ */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.event-card {
  animation: slideIn 0.4s ease-out;
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.player-card:hover .player-photo {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

/* Loading State */
.loading {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.02) 25%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.02) 75%
  );
  background-size: 2000px 100%;
  animation: shimmer 2s infinite;
}
