.site-header {
  width: auto;
  height: auto;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.liga-container {
  height: auto;
}

.liga-container .first-section {
  position: sticky;
  top: 98px;
  height: calc(100vh - 98px);
}

.liga-container .second-section {
  position: relative;
  top: auto;
  height: calc(100vh - 98px);
  overflow: hidden;
  transform: none !important;
}

.league-hero {
  width: min(980px, calc(100% - 32px));
  height: auto;
  margin: 1rem auto 0;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 1rem;
}

.league-hero h1 {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  font-size: clamp(2rem, 1.35rem + 3vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
}

.league-nav-side {
  display: flex;
  align-items: center;
}

.league-nav-side.next {
  position: static;
  width: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  border-radius: 0;
  justify-content: flex-end;
}

.league-nav-button {
  background-color: #330351;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.league-nav-button:hover,
.league-nav-button:visited {
  color: white;
}

.league-nav-button:hover {
  background-color: #2a2c6b;
}

.tables-container {
  width: 85%; /*min(1180px, calc(100% - 32px));*/
  height: 74vh; /*calc(100% - 6.75rem);*/
  margin: 1rem auto;
  gap: 1rem;
  padding: 0;
}

.button-container {
  background-color: #2b2a2cbe;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  padding: 0.75rem;
}

.league-table,
.match-table {
  border-radius: 10px;
}

.league-table,
.match-table {
  width: 40%;
  margin: 0;
}

.button-container {
  width: 20%;
  justify-content: center;
}

.button-container .button {
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem;
  font-size: clamp(0.85rem, 1vw, 1rem);
  font-weight: 800;
  text-align: center;
}

table {
  border-radius: 8px;
}

th,
td {
  border-color: rgba(255, 255, 255, 0.12);
}

.second-section {
  background: rgba(43, 42, 44, 0.96);
}

.left,
.right {
  gap: 2rem;
}

#nachholspiele,
.table-slideshow {
  /*background-color: #2b2a2cbe;*/
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  padding: 0.75rem;
}

.matchday-slideshow{
  padding: 0.75rem;
}

.table-slideshow {
  gap: 0.75rem;
  justify-content: flex-start;
  min-height: 0;
  width: 80%;
}

.table-tabs {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
  padding: 0.25rem;
  width: 100%;
}

.table-tab {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #dcd6e0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 40px;
  padding: 0.45rem 0.65rem;
}

.table-tab.active {
  background-color: #330351;
  color: white;
}

.table-tab:not(.active):hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
}

.table-slideshow > .prev,
.table-slideshow > .next,
.table-slideshow .dot {
  display: none;
}

.slide {
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  display: none;
  height: auto;
  max-height: min(32vh, 360px);
  min-height: 0;
  overflow: auto;
  padding: 0;
  width: 100%;
}

.slide table {
  display: table;
  height: auto;
  min-width: 100%;
  table-layout: fixed;
}

.slide thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.matchday-slideshow {
  width: min(760px, 100%);
  padding-block: 2.5rem;
}

.modal {
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(3px);
}

.modal-content {
  background-color: #2b2a2c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
  color: white;
  max-height: 86vh;
  overflow: auto;
  padding: 1.2rem;
  width: min(760px, calc(100% - 32px));
}

.modal-content-profile {
  background-color: #2b2a2c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
  color: white;
  max-height: 86vh;
  max-width: 760px; /* wieder weg, wegen Game Summaries */
  overflow: auto;
  padding: 1.2rem;
  width: min(760px, calc(100% - 32px));
}

.modal-content h2,
.modal-content-profile h2 {
  color: white;
  font-size: clamp(1.35rem, 1rem + 1vw, 1.75rem);
  line-height: 1.2;
  margin: 0 2.5rem 1rem;
}

.modal-content p,
.modal-content-profile p {
  color: #f0f3f7;
}

.close {
  align-items: center;
  background-color: #330351;
  border-radius: 8px;
  color: white;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  line-height: 1;
  right: 1rem;
  top: 1rem;
  width: 36px;
}

.close:hover,
.close:focus {
  background-color: #2a2c6b;
  color: #dcd6e0;
}

#modalDetails strong,
#statsModalDetails .label {
  color: #ffcc00;
}

.game-title-vs {
  color: #dcd6e0;
  font-size: 0.8em;
  margin-inline: 0.35rem;
}

.game-profile {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 1rem;
  text-align: left;
}

.game-player-line {
  align-items: center;
  color: #dcd6e0;
  display: flex;
  flex-wrap: wrap;
  font-size: 1.25rem;
  font-weight: 900;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.blue-player {
  color: #76a9ff;
}

.red-player {
  color: #ff8d8d;
}

.game-status {
  background-color: #330351;
  border-radius: 8px;
  color: white;
  flex-shrink: 0;
  font-weight: 900;
  padding: 0.7rem 0.9rem;
}

.game-profile.open .game-status {
  background-color: rgba(255, 255, 255, 0.1);
  color: #dcd6e0;
}

.game-stat-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.game-stat-grid.open-match {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Hier verändert
#maps-container,
.maps-container { 
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 0 !important;
}*/

#maps-container,
.maps-container {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0 !important;
}

.maps-row {
  display: grid;
  gap: 0.65rem;
  justify-content: center;
  width: 100%;
}

.maps-row-1 {
  grid-template-columns: minmax(150px, min(240px, 100%));
}

.maps-row-2 {
  grid-template-columns: repeat(2, minmax(150px, 220px));
}

.maps-row-3 {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  max-width: 720px;
}

.map-card {
  background-color: rgba(0, 0, 0, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-left: 5px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 8px !important;
  color: white !important;
  display: flex !important;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0 !important;
  padding: 0.75rem !important;
  text-align: left !important;
  text-decoration: none !important;
  height: 100%;
}

.map-card.blue-win {
  border-left-color: #477dff !important;
}

.map-card.red-win {
  border-left-color: #ff5e5e !important;
}

.map-card:hover {
  background-color: #2a2c6b !important;
}

.map-number,
.map-meta {
  color: #dcd6e0 !important;
  font-size: 0.82rem;
  font-weight: 700;
}

.map-number {
  text-transform: uppercase;
}

.game-empty-state {
  background: rgba(0, 0, 0, 0.18);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #dcd6e0;
  grid-column: 1 / -1;
  padding: 1rem;
  text-align: center;
}

.player-info {
  background-color: transparent !important;
  border-radius: 8px;
  height: auto;
  margin-inline: auto;
  max-width: 100%;
  table-layout: auto;
  width: 100%;
}

.player-info tr {
  background-color: transparent;
}

.player-info td {
  border-color: rgba(255, 255, 255, 0.12);
  color: white;
  font-style: normal;
  white-space: normal;
}

.stats-profile {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 1rem;
  text-align: left;
}

.stats-eyebrow,
.stats-stat-label,
.stats-stat-sub {
  color: #dcd6e0;
  font-size: 0.82rem;
  font-weight: 700;
}

.stats-eyebrow,
.stats-stat-label {
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stats-player-name {
  color: white;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.1;
  margin-top: 0.2rem;
}

.stats-player-meta {
  color: #dcd6e0;
  margin-top: 0.25rem;
}

.stats-profile-link {
  background-color: #330351;
  border-radius: 8px;
  color: white;
  flex-shrink: 0;
  font-weight: 800;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
}

.stats-profile-link:hover,
.stats-profile-link:visited {
  color: white;
}

.stats-profile-link:hover {
  background-color: #2a2c6b;
}

.stats-section {
  margin-top: 1rem;
  text-align: left;
}

.stats-section h3 {
  color: white;
  font-size: 1rem;
  margin: 0 0 0.55rem;
}

.stats-grid,
.stats-duel-grid {
  display: grid;
  gap: 0.65rem;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid.compact,
.stats-duel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-stat,
.stats-duel-card {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
}

.stats-stat-value {
  color: white;
  font-size: 1.28rem;
  line-height: 1.1;
}

@media (max-width: 1024px) {
  .site-header {
    position: relative;
    top: auto;
  }

  .liga-container {
    height: auto;
  }

  .liga-container .first-section,
  .liga-container .second-section {
    position: static;
    top: auto;
    height: auto;
    overflow: visible;
  }

  .league-hero {
    grid-template-columns: 1fr;
    margin-top: 1.5rem;
    text-align: center;
  }

  .league-nav-side {
    justify-content: center;
  }

  .league-nav-side.previous {
    order: 2;
  }

  .league-nav-side.next {
    justify-content: center;
    order: 3;
  }

  .league-hero h1 {
    order: 1;
  }

  .league-nav-button {
    justify-content: center;
    min-width: min(220px, 100%);
  }

  .tables-container {
    width: min(980px, calc(100% - 32px));
    height: auto;
    margin: 1rem auto 1.5rem;
  }

  .league-table,
  .match-table,
  .button-container {
    width: 100%;
  }

  .button-container {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .button-container .button {
    min-width: 0;
  }
}

@media (max-width: 767.98px) {
  .tables-container {
    width: min(100% - 24px, 720px);
  }

  .league-table,
  .match-table,
  .button-container,
  #nachholspiele,
  .table-slideshow,
  .matchday-slideshow {
    border-radius: 8px;
    padding: 0.5rem;
  }

  .table-tabs {
    grid-template-columns: 1fr;
  }

  .slide {
    max-height: 360px;
  }

  .stats-profile,
  .game-profile {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-profile-link {
    text-align: center;
  }

  .game-stat-grid,
  .game-stat-grid.open-match,
  .stats-grid,
  .stats-grid.compact,
  .stats-duel-grid {
    grid-template-columns: 1fr;
  }

  .button-container {
    flex-direction: column;
  }

  .modal-content,
  .modal-content-profile {
    width: min(92vw, 600px);
  }
}
