:root {
  --bg-dark: #0f1419;
  --bg-card: #1a2332;
  --bg-card-hover: #232f42;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --text: #e8eaed;
  --text-muted: #8b95a5;
  --border: #2d3a4d;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --bronze: #cd7f32;
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #00a88a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Navigation journées */
.matchday-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.nav-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--bg-dark);
  color: var(--text);
  font-size: 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.matchday-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.matchday-select {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.matchday-select:hover,
.matchday-select:focus {
  border-color: var(--accent);
  outline: none;
}

.matchday-dates {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stats-context {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Sections */
.section {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title .icon {
  font-size: 1.5rem;
}

/* Grid for 3 columns */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tbody tr {
  transition: background 0.2s ease;
}

.data-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.data-table.compact th,
.data-table.compact td {
  padding: 0.75rem 1rem;
}

/* Standings table */
.standings-table th:nth-child(n+3),
.standings-table td:nth-child(n+3) {
  text-align: center;
}

.standings-table .diff-cell {
  font-weight: 600;
  color: var(--text-muted);
}

.standings-table .pts-cell {
  color: var(--accent);
}

/* Goals chart */
.goals-chart-container {
  margin-bottom: 1.5rem;
}

.goals-chart {
  min-height: 180px;
  padding: 1rem 0;
  width: 100%;
}

.goals-line-chart {
  width: 100%;
  height: 180px;
  overflow: visible;
}

.goals-line-path {
  stroke: var(--accent);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s ease;
}

.goals-line-dot {
  fill: var(--accent);
  stroke: var(--bg-card);
  stroke-width: 2;
  cursor: pointer;
}

.goals-line-dot:hover {
  fill: #00a88a;
}

.goals-line-label {
  font-size: 0.7rem;
  fill: var(--text-muted);
  font-family: inherit;
}

/* Team logos */
.team-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.team-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Score badge */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 0.25rem 0.5rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
  border-radius: 6px;
}

/* Rank badges */
.rank-1 { color: var(--gold); font-weight: 700; }
.rank-2 { color: var(--silver); font-weight: 600; }
.rank-3 { color: var(--bronze); font-weight: 600; }

/* Loading */
.loading-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.data-table .no-data {
  color: var(--text-muted);
  font-style: italic;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}
