html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

#container {
  display: flex;
  height: 100%;
}

#tableSection {
  width: 100%;
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
}

#tableSection table {
  width: 100%;
  border-collapse: collapse;
}

#tableSection th, #tableSection td {
  border: 1px solid #ccc;
  padding: 5px;
  text-align: left;
}

#tableSection tbody tr:hover {
  background-color: #f0f0f0;
  cursor: pointer;
}

#detailSection {
  position: relative;
  width: 0;
  overflow: hidden; /* Verhindert, dass die ganze Sektion scrollt */
  transition: width 0.3s, padding 0.3s;
  padding: 0;
  background: #cce4ff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  box-sizing: border-box;
  
  /* NEU: Flexbox Layout */
  display: flex;
  flex-direction: column;
  height: 100vh; /* Nutzt die volle Höhe */
}

#detailSection.visible {
  width: 40%;
  padding: 0; /* Padding entfernen wir hier und geben es dem Content */
}

/* NEU: Ein Container für alles, was scrollen soll (Bild + Felder) */
.detailScrollContainer {
  flex: 1; /* Nimmt den restlichen Platz ein */
  overflow-y: auto;
  padding: 15px; /* Hier kommt das Padding rein */
  -webkit-overflow-scrolling: touch;
}

/* NEU: Ein Container für die Buttons, der immer unten bleibt */
.detailFooter {
  padding: 15px;
  background: #b8d4f5; /* Etwas dunkler als der Hintergrund für Absetzung */
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  bottom: 0;
}

.closeBtn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}
.close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

#playerForm {
  display: none; /* versteckt das Formular initial */
  position: fixed;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #ccc;
  padding: 20px;
  box-shadow: 0 0 15px rgba(0,0,0,0.25);
  z-index: 1000;
  width: 90%;
  max-width: 500px; /* optional */
  max-height: 90%;
  overflow-y: auto;
  box-sizing: border-box;

  display: flex;           /* hier Flexbox aktivieren */
  flex-direction: column;  /* einspaltig */
  gap: 12px;
}

/* Überschrift */
#formTitle {
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

/* Buttons am Ende */
#playerForm button {
  align-self: flex-start; /* Buttons links ausrichten */
  padding: 8px 12px;
  font-size: 1em;
  cursor: pointer;
}


#playerForm input,
#playerForm button,
#playerForm img {
  width: 100%;
  box-sizing: border-box;
}

#gameTableSection thead {
  background-color: #e95e1f;
  color: white;
}
#playersTable thead, #gameTableSection thead {
  background-color: #e95e1f;
  color: white;
}

#playersTable th {
  padding: 8px 12px;
  text-align: left;
  user-select: none;
  cursor: pointer;
}
#playersTable th:nth-child(2),
#playersTable td:nth-child(2) { width: 120px; }
#playersTable th:nth-child(3),
#playersTable td:nth-child(3) { width: 140px; }

#previewImage, #detailImage {
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Mobile Ansicht: DetailSection Vollbild */
/* Mobile Fix für iPad/iPhone */
@media (max-width: 768px) {
  #detailSection {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 0;
    z-index: 1000;
  }
  #detailSection.visible {
    width: 100vw;
  }
}

  #tableSection {
    width: 100%;
  }
}
.ageClass {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
}

/* Beispiel Farben */
.ageU12 { background-color: #c8e6c9; color: #2e7d32; }   /* grün */
.ageU14 { background-color: #fff9c4; color: #f57f17; }   /* gelblich */
.ageU16 { background-color: #ffe0b2; color: #e65100; }   /* orange */
.ageU18 { background-color: #ffe0b2; color: #e65100; }   /* orange */
.ageU10 { background-color: #c8e6c9; color: #2e7d32; }   /* grün */
.ageU8  { background-color: #c8e6c9; color: #2e7d32; }   /* grün */
.ageHerren { background-color: #ffe0b2; color: #e65100; } /* orange */
.ageOther  { background-color: #eeeeee; color: #555555; } /* neutral */

#clubHeader {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #f5f5f5;
  border-bottom: 2px solid #ccc;
        
}

#clubLogo {
  height: 60px;       /* passt das Logo an */
  margin-right: 15px;
}

#clubName {
  font-size: 2em;      /* große Buchstaben */
  font-weight: bold;
  color: #333;
        color: #e95e1f;
    font-weight: 600;
    text-shadow: none;
    border-bottom: 0;
}

/* Mobile: Logo oben, Name darunter */
@media (max-width: 600px) {
  #clubHeader {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  #clubLogo {
    margin-right: 0;
    margin-bottom: 5px;
    height: 50px;
  }
  #clubName {
    font-size: 1.5em;
  }
}
.sortArrow {
  font-size: 0.8em;
  margin-left: 5px;
  display: inline-block;
}

th {
  cursor: pointer;
  user-select: none;
}
/* Navigation Buttons */
.navbar {
  display: flex;
  gap: 10px;
  margin: 10px 0 0 10px;
  flex-wrap: wrap; /* responsive: Buttons umbrechen bei kleiner Breite */
}

.navbar a {
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  transition: background 0.2s, transform 0.1s;
}

.navbar a:hover {
  transform: scale(1.05);
}

/* Farbvarianten */
.nav-blue { background-color: #0077cc; }
.nav-green { background-color: #28a745; }
.nav-orange { background-color: #ff8800; }
.nav-red { background-color: #dc3545; }
/* --- Buttons --- */
/* ================= BigButton ================= */
/* ================= BigButton ================= */
.bigButton {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  background-color: #0073e6;      /* bisherige Farbe */
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  text-decoration: none;           /* hier Unterstreichung deaktivieren */
  display: inline-flex;            /* damit Icon + Text sauber nebeneinander */
  align-items: center;
  gap: 6px;                        /* Abstand zwischen Icon und Text */
}

.bigButton:hover {
  background-color: #005bb5;      /* bisherige Hover-Farbe */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.bigButton:active {
  background-color: #004494;      /* bisherige Klick-Farbe */
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
/* Navigation Links */
.navbar a {
  display: inline-block;
  padding: 10px 16px;
  margin-right: 10px;
  border-radius: 6px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  background-color: #0073e6;
  transition: background-color 0.2s;
}

.navbar a.nav-green { background-color: #28a745; }
.navbar a:hover { opacity: 0.85; }

/* Tabellen */
table {
  border-collapse: collapse;
  width: 100%;
}

table th, table td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
  font-size: 14px;
}

table th {
  background-color: #e95e1f;
    color:white;
}

/* Multi-Select / Inputs */
select[multiple], input[type="text"], input[type="date"], input[type="number"] {
  font-size: 14px;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

/* Detailbereich / Formulare */
#playerForm, #spielFormContainer, #lineupContainer {
  margin-top: 15px;
}

/* Checkbox in Aufstellung */
.lineupCheckbox {
  width: 24px;
  height: 24px;
  cursor: pointer;
}

/* Responsive / iOS touch */
@media (max-width: 768px) {
  .bigButton, .navbar a {
    padding: 14px 20px;
    font-size: 18px;
  }

  table th, table td {
    font-size: 16px;
    padding: 10px;
  }

  select[multiple], input[type="text"], input[type="date"], input[type="number"] {
    font-size: 16px;
    padding: 8px;
  }
}
#playersTable th:nth-child(5),
#playersTable td:nth-child(5) {
  text-align: center;
  width: 110px;
}
#playerSelection {
  overflow: hidden;
  transition: max-height 0.5s ease;
}

#playerSelection.collapsed {
  max-height: 0;
}
.periodBar {
  width: 100%;
  height: 12px;
  background-color: #ddd;
  border-radius: 6px;
  overflow: hidden;
}

.periodBar .fill {
  width: 0%;
  height: 100%;
  background-color: #4caf50;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 6px 0 0 6px;
}
.periodBarSmall {
  width: 20px;
  height: 40px;
  background: #eee;
  margin: 0 auto;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.periodBarSmall .fill {
  width: 100%;
  height: 0;
  background-color: #4caf50;
  transition: height 0.3s, background-color 0.3s;
  position: absolute;
  bottom: 0;
}
/* ================= iOS / iPadOS Optimierungen ================= */

/* Momentum Scroll für Touch */
#playerSelection,
#gameTableContainer {
  -webkit-overflow-scrolling: touch;
}

/* Touchfreundliche Buttons / Links */
.bigButton, .navbar a {
  min-height: 44px;
  min-width: 44px;
}

/* Tabellen horizontal scrollen auf kleinen Geräten */
#gameTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

/* Balkenanzeige immer sichtbar, auch bei 0% */
.periodBar .fill,
.periodBarSmall .fill {
  min-height: 5px;
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Optional: Hover auf Touch ersetzen */
#gameTable tbody tr:hover,
#gameTable tbody tr:active {
  background-color: #f0f0f0;
}

/* Verhindert Flackern bei Fixed / Absolute + scroll */
#playerSelection {
  transform: translateZ(0);
}

/* Datum, Gegner & Heim/Auswärts Eingabefelder touchfreundlicher */
input[type="date"], input[name="gegner"], select[name="homeAway"] {
  font-size: 16px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}

/* iPad Portrait Anpassung */
@media (max-width: 1024px) {
  #gameTable th, #gameTable td {
    padding: 10px;
    font-size: 16px;
  }
  .periodBar, .periodBarSmall {
    height: 25px;
  }
}
#clubHeader {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 15px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: relative;
}

.headerTop {
  display: flex;
  align-items: center;
  gap: 10px;
}

#clubLogo {
  height: 50px;
}

#clubName {
  margin: 0;
  font-size: 1.5rem;
}

.headerNav {
  display: flex;
  gap: 10px;
  position: relative;
}

.tabLink {
  padding: 5px 10px;
  text-decoration: none;
  color: #000;
  position: relative;
  z-index: 1;
}

.tabLink:hover {
  color: #007bff;
}

.tabLink.active {
  font-weight: bold;
}

.tabIndicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: #007bff;
  transition: all 0.3s ease;
  z-index: 0;
}

/* Responsive: Tabs unter Logo zentriert */
@media (max-width: 600px) {
  #clubHeader {
    flex-direction: column;
    align-items: center;
  }
  .headerNav {
    justify-content: center;
    margin-top: 10px;
  }
}
#gameTableContainer {
  width: 100%;
  overflow-x: auto; /* Scrollbalken nur bei Bedarf */
  -webkit-overflow-scrolling: touch; /* weiches Scrollen auf iPad/iPhone */
}

#gameTableContainer table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* Spalten gleichmäßig verteilen */
}

#gameTableContainer th,
#gameTableContainer td {
  padding: 10px;
  text-align: center;
  font-size: 16px; /* besser lesbar auf Touchscreens */
}

@media (max-width: 768px) {
  #gameTableContainer th,
  #gameTableContainer td {
    padding: 12px 6px; /* etwas mehr Platz fürs Tippen */
  }
}
.lineupCheckbox {
  width: 28px;
  height: 28px;
  cursor: pointer;
  accent-color: #e95e1f; /* BBC-Orange */
  transform: scale(1.2); /* für Browser, die Checkbox-Rendering unterstützen */
}

/* Optional: auf mobilen Geräten noch etwas größer */
@media (max-width: 768px) {
  .lineupCheckbox {
    width: 34px;
    height: 34px;
    transform: scale(1.4);
  }
}
#gameTableContainer td {
  padding: 10px 8px;
}
#playerSelection {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

#playerSelection.expanded {
  max-height: 500px; /* oder so groß, dass alle Spieler reinpassen */
}
main {
  padding: 15px;
  box-sizing: border-box; /* optional, sorgt dafür, dass Padding nicht die Gesamtbreite beeinflusst */
}
#closeDetailBtn {
  font-size: 24px;       /* macht Text oder Icon größer */
  padding: 10px 14px;    /* vergrößert die Klickfläche */
  border-radius: 8px;    /* optisch angenehmer */
  background: #f0f0f0;   /* leichtes Grau für bessere Sichtbarkeit */
  border: 1px solid #ccc;
  cursor: pointer;
  touch-action: manipulation; /* verbessert Reaktionszeit auf iOS */
}

#closeDetailBtn:active {
  background: #ddd; /* visuelles Feedback beim Tippen */
}
#togglePlayerSelectionBtn {
  /* margin-top: 20px;   /* oben mehr Platz */
  margin-bottom: 15px; /* unten etwas Abstand */
}
/* ================= Detailbereich ================= */
.detail-section {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 0;
  overflow: hidden;
  transition: width 0.3s, padding 0.3s;
  padding: 0;
  background: #cce4ff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.detail-section.visible {
  width: 40%;
  padding: 10px;
}

/* Überschrift */
.detail-section h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.5rem;
  text-align: center;
}

/* Bild */
.detail-image {
  max-width: 150px;
  min-height: 150px;
  display: block;
  margin: 0 auto 15px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* sanfter Schatten */
  transition: transform 0.3s;
}
.detail-image:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}
@media (max-width: 768px) {
  .detail-image {
    max-width: 120px;
    min-height: 120px;
  }
}
/* Feldcontainer: klassische 2-Spalten-Darstellung */
.detail-field {
  display: grid;
  grid-template-columns: 120px 1fr; /* Label links, Input rechts */
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.detail-field.double {
  grid-template-columns: 1fr 1fr; /* PLZ + Ort nebeneinander */
}

.detail-field label {
  font-weight: bold;
  text-align: right;
}

.detail-field input,
.detail-field select,
.detail-field textarea {
  width: 100%;
  padding: 6px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #fff;
  box-sizing: border-box;
}

/* Readonly Styles */
.detail-field input[readonly],
.detail-field textarea[readonly],
.detail-field select:disabled {
  background-color: #f7f7f7;
  color: #333;
  cursor: default;
}

/* Checkbox */
.detail-field input[type="checkbox"] {
  width: auto;
  transform: scale(1.2);
  cursor: default;
}

/* ================= Close Button ================= */
#closeDetailBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 1.8rem;      
  padding: 0;
  border-radius: 8px;
  border: 1px solid #ccc;
  cursor: pointer;
  touch-action: manipulation;
  z-index: 10;
  background-color: #0073e6;
  color: white;
}

#closeDetailBtn:active {
  background: #ddd;
}

/* ================= Touch Buttons ================= */
.detail-buttons {
  display: flex;
  justify-content: center; /* Buttons zentrieren */
  gap: 10px;
  margin-top: auto; /* Buttons nach unten schieben */
  flex-wrap: wrap;
  padding: 10px 0;
}

.touchBtn {
  padding: 10px 16px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  background-color: #0073e6;
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s;
}

.touchBtn:hover {
  background-color: #005bb5;
}

.touchBtn:active {
  background-color: #004494;
}

/* ================= Mobile Ansicht ================= */
@media (max-width: 768px) {
  .detail-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    padding: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: width 0.3s, padding 0.3s;
  }

  .detail-section.visible {
    width: 100vw;
    padding: 10px;
  }

  .detail-field {
    grid-template-columns: 100px 1fr; /* kleinere Label-Spalte */
  }

  .detail-field.double {
    grid-template-columns: 1fr 1fr;
  }

  .touchBtn {
    flex: 1 1 100%;       /* Buttons untereinander auf Mobile */
    font-size: 18px;
    padding: 12px 0;
  }

  #closeDetailBtn {
    width: 56px;
    height: 56px;
    font-size: 2rem;
  }
}
/* === Toast Notifications === */
#toastContainer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: #323232;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background-color: #4caf50;
}

.toast.error {
  background-color: #e53935;
}

.toast.info {
  background-color: #2196f3;
}
.bigButton.nav-orange {
  background-color: #ff9800;
  color: white;
}
.filterButton {
  background-color: #e95e1f;  /* gleiche Farbe wie Tabellen-Header */
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
 margin-bottom: 12px;
}

.filterButton:hover {
  background-color: #cc4f19;  /* etwas dunkler bei Hover */
  transform: translateY(-1px);
}

.filterButton:active {
  background-color: #b54414;
  transform: translateY(0);
}
/* Spaltenbreiten anpassen */
#playersTable th:nth-child(1),
#playersTable td:nth-child(1) {
  width: 60px;           /* Foto etwas schmaler */
  text-align: center;
}

#playersTable th:nth-child(2),
#playersTable td:nth-child(2) {
  width: 150px;          /* Vorname breiter */
}
#gameTable th:nth-child(2),
#gameTable td:nth-child(2) {
  width: 120px;          /* Vorname breiter */
}

#playersTable th:nth-child(3),
#playersTable td:nth-child(3) {
  width: 180px;          /* Nachname noch breiter */
}
#gameTable th:nth-child(3),
#gameTable td:nth-child(3) {
  width: 150px;          /* Nachname noch breiter */
}

#playersTable th:nth-child(4),
#playersTable td:nth-child(4) {
  width: 80px;           /* Trikotnummer bleibt kompakt */
  text-align: center;
}
#playersTable tbody tr.inactive {
  opacity: 0.5;
}
#gameTable th:nth-child(4),
#gameTable td:nth-child(4) {
  width: 100px;           /* Trikotnummer bleibt kompakt */
  text-align: center;
}
.detail-image,
#detailIcon {
  width: 150px;
  height: 150px;
  background-color: #f9f9f9;        /* heller Hintergrund */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
 margin-bottom: 20px  !important;
}

#detailIcon svg {
  width: 70%;
  height: 70%;  
  stroke: rgb(233, 94, 31);                   /* gleiche Farbe wie im Standard-SVG */
}
.detail-image.editable {
  border: 2px dashed #ffa500; /* gestrichelter orangener Rahmen */
  border-radius: 10%;
  cursor: pointer;
}

.editIcon {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: #ffa500;
  color: white;
  padding: 2px 4px;
  font-size: 12px;
  border-radius: 3px;
  display: none;
}
/* Detailbild bearbeitbar */
.editable {
  border: 2px dashed #e95e1f !important;
  border-radius: 5px; /* passt zum Standard */
  cursor: pointer;
}
#attendanceContainer {
  background-color: rgba(233, 94, 31, 0.1); /* leichtes Orange, 10% Deckkraft */
  padding: 15px;
  border-radius: 8px;
    display: none;
}
#attendanceSummary table {
  width: 100%;
  border-collapse: collapse;
}

#attendanceSummary th, #attendanceSummary td {
  padding: 4px 6px;
  border: 1px solid #e0dcd7;
  text-align: center;
  font-size: 0.9rem;
}

#attendanceSummary th {
  background-color: #ffe5d0;
  color: #e95e1f;
}

.present {
  background-color: #c8f5c8; /* hellgrün */
}

.absent {
  background-color: #f5c8c8; /* hellrot */
}
/* Overlay */
#attendanceModal {
  position: fixed;
  inset: 0; /* ersetzt top/left/right/bottom: 0 */
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none; /* unsichtbar bis geöffnet */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Inhalt */
#attendanceModal .modal-content {
  background-color: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  height: 90%;
  overflow-y: auto;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.25s ease-in-out;
}

/* Schließen-Button */
#closeModalBtn {
  align-self: flex-end;
  font-size: 1.6rem;
  font-weight: bold;
  color: #444;
  cursor: pointer;
}
#closeModalBtn:hover {
  color: #000;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
/* Falls noch nicht vorhanden */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
/* ---------- Controls Container ---------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

/* Gruppierung der Buttons */
.buttonGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Buttons ---------- */
/* Farbvarianten */
.bigButton.primary {
  background: #eaf3ff;
  border-color: #c5dcff;
  color: #1a56db;
}

.bigButton.primary:hover {
  background: #d8e8ff;
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .buttonGroup {
    justify-content: space-between;
  }
  .bigButton span {
    display: none;
  }
  .bigButton {
    justify-content: center;
    padding: 10px;
  }
}
.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #e67e22; /* Deine Club-Farbe */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#autoSaveStatus {
    display: inline-block;
    padding: 5px 12px;
    background: #f0f0f0;
    border-radius: 15px;
    border: 1px solid #ddd;
    font-weight: 500;
    transition: all 0.3s ease;
}
/* Vergrößert die Checkboxen in der Spieltabelle */
.periodCheckbox {
    width: 25px;
    height: 25px;
    cursor: pointer;
    /* Verhindert das Zoomen bei Klick auf Mobilgeräten */
    touch-action: manipulation; 
}

/* Macht die gesamte Tabellenzelle klickbar */
#gameTable td {
    padding: 10px 5px; /* Mehr vertikaler Platz */
    text-align: center;
    vertical-align: middle;
}

/* Optional: Die Zelle optisch hervorheben, wenn man drüberfährt */
#gameTable tbody td:has(.periodCheckbox):hover {
    background-color: #f9f9f9;
}