:root {
  --bg: #0a0e1a;
  --bg-elevated: #111827;
  --bg-card: #1a1f2e;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --border: rgba(148, 163, 184, 0.2);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Cairo', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #111827 0%, #0a0e1a 50%, #000 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

body[dir="rtl"] {
  font-family: 'Cairo', 'Inter', system-ui, sans-serif;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.brand-logo--small {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-weight: 700;
  font-size: 16px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Sélecteur de langue */
.lang-selector {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.lang-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text);
}

.lang-btn.is-active {
  background: var(--accent);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Sélecteur de championnat */
.league-selector-wrapper {
  position: relative;
}

.league-select {
  padding: 8px 12px;
  padding-right: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 180px;
  transition: all 0.2s;
}

body[dir="rtl"] .league-select {
  padding-left: 32px;
  padding-right: 12px;
  background-position: left 10px center;
}

.league-select:hover {
  border-color: var(--accent);
}

.league-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Hero */
.hero {
  padding: 24px 0;
  text-align: center;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
}

.hero-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 700px;
  margin-inline: auto;
}

/* Section des matchs */
.matches-section {
  padding: 24px 0 32px;
}

.matches-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(59, 130, 246, 0.1);
}

.tab-btn.is-active {
  background: var(--accent);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.time-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
}

.time-label {
  color: var(--text-muted);
}

.time-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.matches-list {
  display: grid;
  gap: 12px;
}

.match-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.match-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.match-card.is-live {
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.match-header {
  margin-bottom: 10px;
}

.league-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.match-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-home {
  text-align: right;
}

body[dir="rtl"] .team-home {
  text-align: left;
}

.team-away {
  text-align: left;
}

body[dir="rtl"] .team-away {
  text-align: right;
}

.team-name {
  font-weight: 600;
  font-size: 14px;
}

.match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
}

.match-time {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.match-score {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.match-status {
  font-size: 11px;
  color: var(--text-muted);
}

.match-card.is-live .match-status {
  color: var(--danger);
  font-weight: 600;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.match-footer {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 8px;
}

.prediction {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.prediction-label {
  color: var(--text-muted);
}

.prediction-value {
  font-weight: 600;
  color: var(--accent);
}

.no-matches {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  margin-top: 40px;
  background: rgba(10, 14, 26, 0.5);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .header-controls {
    justify-content: space-between;
  }

  .league-select {
    min-width: 140px;
    font-size: 12px;
  }

  .match-body {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .team-home,
  .team-away {
    text-align: center;
  }

  body[dir="rtl"] .team-home,
  body[dir="rtl"] .team-away {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .matches-tabs {
    width: 100%;
    justify-content: stretch;
  }

  .tab-btn {
    flex: 1;
    font-size: 12px;
    padding: 6px 8px;
  }

  .lang-selector {
    flex-wrap: wrap;
  }

  .lang-btn {
    font-size: 11px;
    padding: 4px 8px;
  }
}
.league-section {
  margin-bottom: 40px;
}

.league-title {
  font-size: 20px;
  margin-bottom: 15px;
  padding: 10px 15px;
  background: rgba(255,255,255,0.05);
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
}
