/* ============================
   TCHOUKBALL STATS - Responsive CSS
   Adapts layout for desktop (3 columns) and mobile (tabs)
   ============================ */

/* --- CSS Variables / Theme --- */
:root {
  --bg: #f5f5f5;
  --panel: #fff;
  --field: #d4f1d4;
  --text: #222;
  --accent: #333;
  --border: #ddd;
  --highlight: #ffeb3b;
  --home: #1e88e5;
  --away: #e53935;
  --tab-height: 50px;
}

/* --- Reset & Base --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { 
  height: 100%; 
  margin: 0; 
  touch-action: manipulation;
}
body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
  background: var(--bg); 
  color: var(--text); 
  font-size: 14px;
}

.app { 
  width: 100%; 
  min-height: 100vh; 
  display: flex; 
  flex-direction: column;
}

/* ============================
   HEADER - Scoreboard & Timer
   ============================ */
.header { 
  background: var(--accent); 
  color: #fff; 
  padding: 10px 15px; 
  position: sticky; 
  top: 0; 
  z-index: 100;
}

.scoreboard { 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-start; 
  gap: 10px;
  flex-wrap: wrap;
}

.score-box { 
  display: flex; 
  flex-direction: column;
  align-items: center; 
  gap: 8px;
  flex: 1;
  min-width: 100px;
}

.score-row { 
  display: flex; 
  align-items: center; 
  gap: 8px;
}

.team-name { 
  font-weight: bold; 
  font-size: 14px;
}

.score-value { 
  min-width: 40px; 
  text-align: center; 
  font-size: 28px; 
  font-weight: bold;
}

.score-btn { 
  background: #555; 
  color: #fff; 
  border: none; 
  width: 36px; 
  height: 36px; 
  font-size: 20px; 
  cursor: pointer; 
  border-radius: 4px;
  transition: all 0.15s;
}
.score-btn:hover { background: #666; }
.score-btn:active { background: #777; transform: scale(0.95); }

/* Team configuration inputs */
.team-config { 
  display: flex; 
  align-items: center; 
  gap: 8px;
}

.team-name-input { 
  background: rgba(255,255,255,0.1); 
  border: 1px solid rgba(255,255,255,0.3); 
  color: #fff; 
  padding: 6px 10px; 
  font-size: 12px; 
  border-radius: 4px; 
  width: 120px;
}
.team-name-input::placeholder { color: rgba(255,255,255,0.6); }
.team-name-input:disabled { 
  opacity: 0.5; 
  cursor: not-allowed; 
  background: rgba(255,255,255,0.05);
}

.team-color-picker { 
  width: 32px; 
  height: 26px; 
  border: 2px solid rgba(255,255,255,0.5); 
  border-radius: 4px; 
  cursor: pointer; 
  padding: 0;
}
.team-color-picker:disabled { 
  opacity: 0.5; 
  cursor: not-allowed;
}

/* Timer section */
.timer-box { 
  text-align: center; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 6px;
  flex: 0 0 auto;
}

.timer-row { 
  display: flex; 
  align-items: center; 
  gap: 8px;
}

#timer { 
  font-size: 24px; 
  font-weight: bold; 
  cursor: pointer;
}

.timer-controls { 
  display: flex; 
  gap: 4px;
}

.timer-btn { 
  background: #555; 
  color: #fff; 
  border: none; 
  padding: 4px 8px; 
  font-size: 11px; 
  cursor: pointer; 
  border-radius: 3px;
  transition: background 0.15s;
}
.timer-btn:hover { background: #666; }
.timer-btn:active { background: #777; }
#play-pause { font-size: 14px; padding: 4px 12px; }

.speed-control, .period-control { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  font-size: 12px;
}

.period-display { 
  font-size: 12px;
}
#period-display { 
  min-width: 24px; 
  text-align: center; 
  font-weight: bold;
  font-size: 16px;
}

/* ============================
   MATCH INFORMATION SECTION
   ============================ */
.match-info-section {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  padding: 10px 15px;
  display: flex;
  justify-content: center;
}

.match-date-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.match-date-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.match-date-field input {
  padding: 6px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.85rem;
  background: white;
}

.match-date-field input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.25);
}

.match-date-field input:invalid {
  border-color: #dc3545;
}

.field-error {
  border-color: #dc3545 !important;
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.match-info-section.incomplete {
  background: #fff3cd;
  border-bottom-color: #ffc107;
}

.match-info-section.incomplete h3::after {
  content: ' ⚠️';
  color: #ffc107;
}

.match-info-section.complete {
  background: #d4edda;
  border-bottom-color: #28a745;
}

.match-info-section.complete h3::after {
  content: ' ✓';
  color: #28a745;
}

/* ============================
   FILE UPLOAD / TOOLBAR SECTION
   ============================ */
.file-upload-section { 
  background: var(--panel); 
  padding: 10px 15px; 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
  align-items: center; 
  border-bottom: 1px solid var(--border);
}

.file-upload-btn, .export-btn, .help-btn { 
  background: #555; 
  color: #fff; 
  border: none; 
  padding: 8px 14px; 
  font-size: 12px; 
  cursor: pointer; 
  border-radius: 4px;
  transition: all 0.15s;
}
.file-upload-btn:hover, .export-btn:hover, .help-btn:hover { background: #666; }

.new-match-btn {
  background: #ff5722;
  color: #fff;
  border: none;
  padding: 8px 14px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
  font-weight: bold;
  transition: all 0.15s;
}
.new-match-btn:hover { background: #f4511e; }

.stats-info { 
  flex: 1; 
  font-size: 11px; 
  color: #666; 
  min-width: 200px;
}

/* ============================
   TAB NAVIGATION (Mobile only)
   ============================ */
.tab-nav { 
  display: none; /* Hidden by default on desktop */
  background: var(--panel); 
  border-bottom: 2px solid var(--border); 
  position: sticky; 
  top: 0; /* Will be adjusted */
  z-index: 99;
}

.tab-btn { 
  flex: 1; 
  padding: 12px 8px; 
  border: none; 
  background: transparent; 
  font-size: 12px; 
  font-weight: bold; 
  cursor: pointer; 
  border-bottom: 3px solid transparent; 
  transition: all 0.2s;
}
.tab-btn.active { 
  border-bottom-color: var(--accent); 
  background: #f0f0f0;
}

/* ============================
   FLOATING PLAY/PAUSE BUTTON (Mobile only)
   ============================ */
.mobile-play-pause-btn {
  display: none; /* Hidden by default on desktop */
  position: fixed;
  bottom: 80px; /* Above the tab bar */
  right: 20px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
}

.mobile-play-pause-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-play-pause-btn.playing {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}
.tab-btn.home-tab.active { border-bottom-color: var(--home); }
.tab-btn.away-tab.active { border-bottom-color: var(--away); }

/* ============================
   MAIN CONTENT AREA
   ============================ */
.main { 
  flex: 1; 
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 15px; 
  padding: 15px;
  overflow: auto;
}

/* Mobile content container - hidden on desktop */
.mobile-content {
  display: none;
}

/* Tab content wrapper (for mobile tabs) - hidden on desktop */
.tab-content { 
  display: none;
}

/* Desktop: ensure team columns are visible */
@media (min-width: 901px) {
  .desktop-content {
    display: grid !important;
  }
  
  .mobile-content {
    display: none !important;
  }
  
  .team-col, .center-col {
    display: flex !important;
    flex-direction: column;
  }
  
  .tab-nav {
    display: none !important;
  }
}

/* ============================
   TEAM COLUMNS
   ============================ */
.team-col { 
  display: flex; 
  flex-direction: column; 
  gap: 10px;
}

.team-title { 
  margin: 0; 
  padding: 10px 14px; 
  color: #fff; 
  font-size: 13px; 
  font-weight: bold; 
  border-radius: 6px;
}
.home-title { background: var(--home); }
.away-title { background: var(--away); }
.team-title.clickable { cursor: pointer; }
.team-title.clickable::after { content: ' 📁'; font-size: 12px; }

/* Team section colors for mobile */
.home-section .player.card, .home-section .bench-player.card { border-left-color: var(--home); }
.away-section .player.card, .away-section .bench-player.card { border-left-color: var(--away); }

.list { 
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.section { 
  background: var(--panel); 
  border-radius: 8px; 
  padding: 10px;
}

/* Player cards */
.card { 
  background: var(--panel); 
  border: 1px solid var(--border); 
  border-radius: 6px;
  transition: all 0.15s;
}
.card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.player.card { border-left: 4px solid #777; }
.bench-player.card { border-left: 4px solid #aaa; }
.home-col .player.card, .home-col .bench-player.card { border-left-color: var(--home); }
.away-col .player.card, .away-col .bench-player.card { border-left-color: var(--away); }

.card-body { 
  padding: 8px 10px; 
  cursor: pointer; 
  user-select: none;
}

.player-name { 
  font-weight: bold; 
  font-size: 12px; 
  margin-bottom: 2px;
}

.player-efficiency { 
  font-size: 11px; 
  color: #666; 
  font-weight: normal;
}

.stats-line { 
  font-size: 10px; 
  color: #666; 
  line-height: 1.5;
}

.stat-item { 
  display: inline-block; 
  margin-right: 6px; 
  white-space: nowrap;
}

.coach.card { 
  background: #f9f9f9;
}
.coach.card .card-body { 
  cursor: default; 
  color: #666; 
  text-align: center;
}

/* Team summary card */
.team-summary.card {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border: 2px solid #888;
  border-left-width: 4px;
}
.team-summary.card .card-body {
  cursor: default;
}
.team-summary.card .team-summary-name {
  font-weight: bold;
  font-size: 13px;
  color: #333;
}
.home-col .team-summary.card,
.home-section .team-summary.card {
  border-left-color: var(--home);
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}
.away-col .team-summary.card,
.away-section .team-summary.card {
  border-left-color: var(--away);
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.selected { background: var(--highlight); }
.selected .card-body { background: var(--highlight); }

/* ============================
   CENTER COLUMN - Field, Filters, Events
   ============================ */
.center-col { 
  display: flex; 
  flex-direction: column; 
  gap: 12px;
}

/* Field area */
.field { 
  background: var(--field); 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  min-height: 200px;
  height: 250px;
  position: relative; 
  overflow: hidden; 
  cursor: crosshair; 
  border-radius: 8px;
}

.field img { 
  max-width: 100%; 
  max-height: 100%; 
  object-fit: contain;
}

.field.has-image { background: transparent; }
.field.has-image .field-label { display: none; }

.field-label { 
  color: #666; 
  font-size: 16px;
}

/* Coordinate dots on field */
.coordinate-dot { 
  position: absolute; 
  width: 12px; 
  height: 12px; 
  background: #e53935; 
  border: 2px solid white; 
  border-radius: 50%; 
  transform: translate(-50%, -50%); 
  pointer-events: none; 
  box-shadow: 0 0 6px rgba(0,0,0,0.4); 
  z-index: 10;
}

/* Stat type colors for dots */
.coordinate-dot.point { background: #4caf50; }
.coordinate-dot.lost, .coordinate-dot.perdu { background: #f44336; }
.coordinate-dot.fault { background: #ff9800; }
.coordinate-dot.defense, .coordinate-dot.defence { background: #2196f3; }
.coordinate-dot.hidden { display: none; }

/* Team color borders for dots - uses CSS variables */
.coordinate-dot.team-home { border-color: var(--home); border-width: 3px; }
.coordinate-dot.team-away { border-color: var(--away); border-width: 3px; }

/* Filter sections */
.filter-section { 
  background: var(--panel); 
  padding: 10px 14px; 
  border-radius: 6px; 
  display: flex; 
  flex-wrap: wrap; 
  align-items: center; 
  gap: 8px;
}

.filter-label { 
  font-weight: bold; 
  font-size: 12px; 
  color: #555;
}

.filter-btn { 
  padding: 6px 12px; 
  background: #f0f0f0; 
  border: 1px solid #ccc; 
  cursor: pointer; 
  font-size: 11px; 
  border-radius: 4px;
  transition: all 0.15s;
}
.filter-btn:hover { background: #e5e5e5; }
.filter-btn.active { 
  background: var(--accent); 
  color: #fff; 
  border-color: var(--accent);
}

/* Event history */
.event-history { 
  background: var(--panel); 
  border-radius: 8px; 
  flex: 1; 
  display: flex; 
  flex-direction: column;
  min-height: 200px;
  max-height: 400px;
}

.event-title { 
  margin: 0; 
  padding: 12px 14px; 
  font-size: 14px; 
  font-weight: bold; 
  background: var(--accent); 
  color: #fff; 
  border-radius: 8px 8px 0 0;
}

.event-list { 
  flex: 1; 
  overflow-y: auto; 
  padding: 10px;
}

.event-item { 
  background: #f9f9f9; 
  border: 1px solid var(--border); 
  padding: 10px 12px; 
  font-size: 12px; 
  margin-bottom: 6px; 
  border-radius: 6px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  gap: 10px;
}

.event-time { 
  font-weight: bold; 
  color: var(--accent);
  min-width: 60px;
}

.event-details { 
  flex: 1;
}

.event-score { 
  font-size: 11px; 
  color: #888;
}

.event-player { 
  font-weight: bold;
}

.event-type { 
  color: #555;
}

.event-coords { 
  font-size: 10px; 
  color: #888;
}

.event-remove { 
  background: #e53935; 
  color: #fff; 
  border: none; 
  width: 26px; 
  height: 26px; 
  cursor: pointer; 
  border-radius: 4px; 
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.event-remove:hover { background: #c62828; }

/* ============================
   POPUP MODAL
   ============================ */
.popup-overlay { 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.5); 
  display: none; 
  justify-content: center; 
  align-items: center; 
  z-index: 1000;
}

.popup { 
  width: 90%; 
  max-width: 400px; 
  max-height: 80vh; 
  background: #fff; 
  border-radius: 12px; 
  overflow: hidden; 
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.popup-header { 
  background: #444; 
  color: #fff; 
  padding: 14px 18px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
}

.popup-title { 
  font-size: 16px; 
  font-weight: bold;
}

.popup-close { 
  background: transparent; 
  border: none; 
  color: #fff; 
  font-size: 24px; 
  cursor: pointer; 
  padding: 0 8px;
}

.popup-body { 
  padding: 18px; 
  max-height: 50vh; 
  overflow-y: auto;
}

#popup-player-name { 
  font-size: 14px; 
  margin-bottom: 14px;
}

.popup-actions { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 10px;
}

.stat-btn { 
  padding: 14px 10px; 
  background: #f0f0f0; 
  border: 1px solid #ccc; 
  cursor: pointer; 
  border-radius: 8px; 
  font-size: 13px; 
  font-weight: 500;
  transition: all 0.15s;
}
.stat-btn:hover { background: #e5e5e5; }
.stat-btn:active { background: #ddd; transform: scale(0.98); }

.popup-footer { 
  padding: 14px 18px; 
  border-top: 1px solid #eee;
}

.cancel-btn { 
  width: 100%; 
  background: #555; 
  color: #fff; 
  border: none; 
  padding: 14px; 
  cursor: pointer; 
  border-radius: 8px; 
  font-size: 14px;
  transition: background 0.15s;
}
.cancel-btn:hover { background: #666; }

/* ============================
   TOOLS/SETTINGS SECTION (Mobile)
   ============================ */
.tools-section { 
  margin-bottom: 16px;
}

.tools-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 10px;
}

.tool-btn { 
  background: var(--panel); 
  border: 1px solid var(--border); 
  padding: 14px 10px; 
  border-radius: 8px; 
  cursor: pointer; 
  font-size: 12px; 
  text-align: center;
  transition: all 0.15s;
}
.tool-btn:hover { background: #f5f5f5; }
.tool-btn:active { background: #f0f0f0; }
.tool-btn .icon { font-size: 22px; display: block; margin-bottom: 6px; }
.tool-btn.primary { background: #1e88e5; color: #fff; border-color: #1e88e5; }
.tool-btn.danger { background: #e53935; color: #fff; border-color: #e53935; }
.tool-btn.warning { background: #ff5722; color: #fff; border-color: #ff5722; }

.team-config-section { 
  background: var(--panel); 
  border-radius: 8px; 
  padding: 14px; 
  margin-bottom: 16px;
}

.team-config-row { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  margin-bottom: 12px;
}
.team-config-row:last-child { margin-bottom: 0; }

.team-config-label { 
  font-weight: bold; 
  font-size: 12px; 
  min-width: 55px;
}

/* Mobile team name input styles */
.team-config-section .team-name-input { 
  flex: 1; 
  background: #f5f5f5; 
  border: 1px solid var(--border); 
  color: var(--text); 
  padding: 10px; 
  font-size: 14px; 
  border-radius: 6px;
}

.team-config-section .team-color-picker { 
  width: 44px; 
  height: 36px;
}

.stats-info-box { 
  background: var(--panel); 
  padding: 12px; 
  border-radius: 8px; 
  font-size: 11px; 
  color: #666; 
  margin-top: 10px;
}

/* Hidden file inputs */
input[type="file"] { display: none; }

/* ============================
   MOBILE RESPONSIVE STYLES
   (max-width: 900px)
   ============================ */
@media (max-width: 900px) {
  html, body { overflow: hidden; }
  
  .app { height: 100vh; }
  
  /* Show tab navigation on mobile */
  .tab-nav { display: flex; }
  
  /* Show floating play/pause button on mobile */
  .mobile-play-pause-btn { display: block; }
  
  /* Hide desktop toolbar */
  .file-upload-section { display: none; }
  
  /* Compact header */
  .header { padding: 8px 10px; }
  
  .scoreboard { gap: 6px; }
  
  .score-box { 
    min-width: 80px; 
    gap: 4px;
  }
  
  .score-row { gap: 4px; }
  
  .team-name { font-size: 11px; }
  
  .score-value { 
    font-size: 22px; 
    min-width: 28px;
  }
  
  .score-btn { 
    width: 28px; 
    height: 28px; 
    font-size: 16px;
  }
  
  /* Hide team config in header on mobile */
  .header .team-config { display: none; }
  
  /* Timer adjustments */
  .timer-box { flex: 0 0 auto; }
  
  #timer { font-size: 18px; }
  
  /* Hide extended timer controls on mobile */
  .timer-controls, .speed-control { display: none; }
  
  .period-display { font-size: 11px; }
  
  /* Main content - hide desktop, show mobile */
  .main.desktop-content { 
    display: none !important;
  }
  
  .mobile-content {
    display: block !important;
    flex: 1;
    overflow: hidden;
  }
  
  /* Tab content visible on mobile */
  .tab-content { 
    display: none; /* Still hidden by default */
    padding: 10px;
    padding-bottom: 80px;
    height: calc(100vh - 120px); /* Adjust based on header + tabs height */
    overflow-y: auto;
  }
  
  .tab-content.active { 
    display: block !important; /* Show active tab */
  }
  
  /* Team sections on mobile */
  .team-section { margin-bottom: 14px; }
  
  .team-title { 
    padding: 10px 12px; 
    font-size: 12px;
  }
  
  /* Grid layout for player cards on mobile */
  .list.mobile-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 8px;
  }
  
  .card-body { 
    padding: 8px 6px; 
    text-align: center;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .player-name { font-size: 12px; }
  
  /* Hide detailed stats on mobile (keep only efficiency % in player name) */
  .stats-line { display: none; }
  
  /* Field on mobile */
  .field { 
    height: 180px; 
    min-height: 150px;
    margin-bottom: 10px;
  }
  
  .coordinate-dot { 
    width: 10px; 
    height: 10px;
  }
  
  /* Filter sections on mobile */
  .filter-section { 
    padding: 8px 10px; 
    margin-bottom: 8px;
  }
  
  .filter-label { font-size: 11px; }
  
  .filter-btn { 
    padding: 6px 10px; 
    font-size: 10px;
  }
  
  /* Event history on mobile */
  .event-history { 
    max-height: none;
    min-height: auto;
    flex: 1;
  }
  
  .event-title { 
    padding: 10px 12px; 
    font-size: 13px;
  }
  
  .event-item { 
    padding: 8px 10px; 
    font-size: 11px;
  }
  
  .event-remove { 
    width: 24px; 
    height: 24px; 
    font-size: 14px;
  }
  
  /* Popup on mobile - slide from bottom */
  .popup-overlay { align-items: flex-end; }
  
  .popup { 
    width: 100%; 
    max-width: none; 
    max-height: 75vh; 
    border-radius: 16px 16px 0 0;
    animation: slideUp 0.3s ease;
  }
  
  @keyframes slideUp { 
    from { transform: translateY(100%); } 
    to { transform: translateY(0); } 
  }
  
  .popup-actions { gap: 8px; }
  
  .stat-btn { 
    padding: 12px 8px; 
    font-size: 12px;
  }
  
  /* Tools tab content */
  .tools-grid { gap: 8px; }
  
  .tool-btn { 
    padding: 12px 8px; 
    font-size: 11px;
  }
  .tool-btn .icon { font-size: 20px; margin-bottom: 4px; }
}

/* ============================
   VERY SMALL SCREENS
   (max-width: 400px)
   ============================ */
@media (max-width: 400px) {
  .score-value { font-size: 20px; }
  
  .tab-btn { 
    padding: 10px 4px; 
    font-size: 10px;
  }
  
  .list.mobile-grid { 
    grid-template-columns: 1fr; /* Single column on very small screens */
  }
  
  .popup-actions { 
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ============================
   MATCH INFO BAR (read-only display)
   ============================ */
.match-info-bar {
  background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
  color: #fff;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  border-bottom: 1px solid #333;
}

.back-to-setup-btn {
  background: #333;
  color: #fff;
  border: 1px solid #555;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s;
  white-space: nowrap;
}

.back-to-setup-btn:hover {
  background: #444;
}

.help-link {
  background: #333;
  color: #fff;
  border: 1px solid #555;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.help-link:hover {
  background: #444;
}

#match-info-display {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

#match-info-display .info-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

#match-info-display .info-label {
  color: #888;
  font-size: 11px;
}

#match-info-display .info-value {
  color: #fff;
  font-weight: 500;
}

/* Team color indicator */
.team-color-indicator {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  margin-top: 4px;
}

/* Mobile match info display */
.match-info-display-mobile {
  background: #0f0f1a;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
}

.match-info-display-mobile .info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #333;
}

.match-info-display-mobile .info-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.match-info-display-mobile .info-label {
  color: #888;
}

.match-info-display-mobile .info-value {
  color: #fff;
  font-weight: 500;
}

/* Hide match info bar on mobile (shown in tools tab instead) */
@media (max-width: 768px) {
  .match-info-bar {
    display: none;
  }
}