/* ============================================
   STATS TABLES - Tabbed Statistics View
   ============================================ */

/* Team Tabs Navigation */
.stats-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 3rem;
  border-bottom: 2px solid rgba(108, 171, 221, 0.1);
}

.stats-tab {
  padding: 1rem 2.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.stats-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.stats-tab:hover {
  color: var(--light);
}

.stats-tab.active {
  color: var(--light);
}

.stats-tab.active::after {
  transform: scaleX(1);
}

/* Tab Panels */
.stats-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.stats-panel.active {
  display: block;
}

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

/* Competition Section */
.competition-section {
  margin-bottom: 3rem;
}

.competition-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: var(--sky-blue);
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--sky-blue);
}

/* Stats Table */
.stats-table-container {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.stats-table thead {
  background: rgba(108, 171, 221, 0.05);
}

.stats-table th {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(108, 171, 221, 0.1);
}

.stats-table th:not(:first-child) {
  text-align: center;
}

/* Card icons in header */
.stats-table th .card-icon {
  display: inline-block;
  width: 12px;
  height: 16px;
  border-radius: 2px;
  vertical-align: middle;
}

.stats-table th .card-icon.yellow {
  background: #fbbf24;
}

.stats-table th .card-icon.red {
  background: #dc2626;
}

.stats-table tbody tr {
  border-bottom: 1px solid rgba(108, 171, 221, 0.08);
  transition: background 0.2s ease;
}

.stats-table tbody tr:hover {
  background: rgba(108, 171, 221, 0.05);
}

.stats-table td {
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
  color: var(--light);
}

.stats-table td:first-child {
  font-weight: 600;
  color: var(--light);
}

.stats-table td:not(:first-child) {
  text-align: center;
}

/* Highlight goals */
.stats-table td.goals {
  color: var(--gold);
  font-weight: 600;
}

/* Empty state */
.stats-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
  font-style: italic;
}

/* Last Updated */
.stats-updated {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(108, 171, 221, 0.1);
}

.stats-updated time {
  color: var(--sky-blue);
}

/* Summary Row */
.stats-table tbody tr.summary-row {
  background: rgba(212, 175, 55, 0.05);
  border-top: 2px solid rgba(212, 175, 55, 0.2);
}

.stats-table tbody tr.summary-row td {
  font-weight: 600;
}

.stats-table tbody tr.summary-row td:first-child {
  color: var(--gold);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
  .stats-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: none;
    justify-content: center;
    padding: 0 1rem;
  }

  .stats-tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    border: 1px solid rgba(108, 171, 221, 0.2);
    border-radius: 8px;
    margin-bottom: 0.5rem;
  }

  .stats-tab::after {
    display: none;
  }

  .stats-tab.active {
    background: rgba(108, 171, 221, 0.15);
    border-color: var(--sky-blue);
  }

  .competition-title {
    font-size: 1.3rem;
  }

  .stats-table th,
  .stats-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  .stats-table {
    min-width: 500px;
  }
}

@media (max-width: 480px) {
  .stats-tab {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .stats-table th,
  .stats-table td {
    padding: 0.6rem 0.4rem;
    font-size: 0.8rem;
  }
}

