* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #050816;
    color: #f7f7ff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    padding: 2rem 1.5rem;
    text-align: center;
    background: radial-gradient(circle at top, #2563eb 0, #050816 55%);
}

.header h1 {
    font-size: 2.5rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.header p {
    margin-top: 0.5rem;
    color: #cbd5f5;
}

.main {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1.5rem 3rem;
}

.filters {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.filters h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #9ca3af;
}

.tag {
    background: #1f2937;
    color: #e5e7eb;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

.matches {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.match-card {
    background: #0b1120;
    border-radius: 0.9rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.7);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.match-league {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #60a5fa;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 1.05rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.match-teams .vs {
    opacity: 0.7;
    font-size: 0.85rem;
}

.match-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #9ca3af;
}

.footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: #6b7280;
    border-top: 1px solid rgba(31, 41, 55, 0.8);
}

.btn-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  background: #111827;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.5rem 0.9rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.active {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.error {
  color: #f87171;
  text-align: center;
}

small {
  opacity: 0.7;
}

/* === Mobile: Card Grid wie Skizze === */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 Spalten auf Mobile */
  gap: 0.9rem;
  padding: 1rem;
}

.league-card {
  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  padding: 0.9rem;
  backdrop-filter: blur(8px);
}

.league-card h2 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 650;
  opacity: 0.9;
}

.match-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* Team - Score - Team */
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.6rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.65);
}

.team {
  font-size: 0.85rem;
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score {
  font-weight: 750;
  letter-spacing: 0.05em;
  opacity: 0.95;
}

/* Filter-Zeile auf Mobile: schön kompakt */
.filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0 1rem;
}

.btn-row {
  display: flex;
  gap: 0.6rem;
}

.btn {
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.4);
  color: #e5e7eb;
}

.btn.active {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.crest {
  width: 22px;
  height: 22px;
  object-fit: contain;
  margin: 0 8px;
  opacity: 0.95;
}

.team {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.team.left { justify-content: flex-start; }
.team.right { justify-content: flex-end; }

.team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 16ch;
}

.btn.active {
  border-color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
}

.league-card .meta {
  margin-top: 10px;
  padding: 0 8px;
  opacity: 0.8;
  font-size: 0.95rem;
  text-align: center;
}

.league-card .kickoff {
  letter-spacing: 0.02em;
}

.league-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 1rem 0.5rem 1rem;
  opacity: 0.9;
}

.matchday-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  padding: 8px 12px;
  border-radius: 999px;
  outline: none;
}

.matchday-select:focus {
  border-color: rgba(255,255,255,0.25);
}

.header {
  text-align: center;
}

.logo {
  height: 56px;
  margin-bottom: 0.75rem;
}

