/* ==========================================================================
   1. BASIS-STILE
   ========================================================================== */
body {
  background-color: #FFFACD;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px 0;
}
.container {
  width: 800px;
  margin: 0 auto;
}

/* ==========================================================================
   2. KLASSISCHE ERGEBNISTABELLEN & TOPWERTUNGEN (Lückenlose Farben)
   ========================================================================== */
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  border: 0.5pt solid #000000;
  padding: 6px 4.5pt;
  color: black;
  font-size: 14px;
  vertical-align: top;
}
.title-main { 
  font-size: 18px; 
  background-color: rgb(99,184,255) !important; 
  text-align: center; 
}
.title-mainbraun { 
  font-size: 18px; 
  background-color: rgb(218,194,173) !important; 
  text-align: center; 
}
.title-sub { 
  font-size: 16px; 
  background-color: rgb(240,255,240) !important; 
  text-align: center; 
}
/* hellblau: */
.title-subherren { 
  font-size: 16px; 
  background-color: rgb(224,255,255) !important; 
  text-align: center; 
}
.title-subdamen { 
  font-size: 16px; 
  background-color: rgb(255,228,225) !important; 
  text-align: center; 
}
.title-submixed { 
  font-size: 16px; 
  background-color: rgb(153,255,153) !important; 
  text-align: center; 
}
.title-subgruen { 
  font-size: 16px; 
  background-color: rgb(193,255,193) !important; 
  text-align: center; 
}
.header-row td { 
  background-color: rgb(240,255,240) !important; 
  text-align: center; 
  font-weight: bold; 
}
a { 
  color: #0066cc; 
  text-decoration: none; 
}
a:hover { 
  text-decoration: underline; 
}
.cell-center { text-align: center; }
.cell-left   { text-align: left; }
.cell-right  { text-align: right; }

/* FARBEN FÜR EINZEL-BILANZEN (Präzise freigeschaltet) hellgrün, mittelblau, rosarot */
.bg-win   { background-color: rgb(193,255,193) !important; }
.bg-plus  { background-color: rgb(152,233,235) !important; }
.bg-minus { background-color: rgb(255,174,185) !important; }


/* Gelbe Infobox / Fußzeile am Ende der Tabellen */
.table-footer {
  background-color: rgb(255,246,143) !important;
  font-size: 12px;
  text-align: left;
}

/* Gelber Hintergrund für Top-Doppel (greift sowohl auf tr als auch auf td) 255,246,143*/
.bg-highlight, .bg-highlight td {
  background-color: rgb(255,250,205) !important;
}

/* ==========================================================================
   3. GEMEINSAME RASTER-LOGIK (Startseite & Saisonseiten)
   ========================================================================== */
.main-nav-wrapper, .container-season {
  border-left: 0.5pt solid #000000;
  border-top: 0.5pt solid #000000;
  border-right: 0.5pt solid #000000;
  box-sizing: border-box;
}
.container-season { 
  width: 800px; 
  margin: 0 auto; 
}

.main-nav-header, .season-main-title {
  background-color: rgb(255,211,155);
  font-weight: bold;
  text-align: center;
  padding: 10px;
  border-bottom: 0.5pt solid #000000;
}
.season-main-title { font-size: 22px; }
.main-nav-header { font-size: 20px; }

.season-area-title {
  background-color: rgb(174, 231, 245);
  font-size: 18px;
  font-weight: bold;
  padding: 8px;
  text-align: center;
  border-bottom: 0.5pt solid #000000;
}
.main-nav-sub-header, .season-category-title {
  background-color: rgb(240,255,240);
  font-weight: bold;
  padding: 8px;
  border-bottom: 0.5pt solid #000000;
}
.main-nav-sub-header { text-align: center; font-size: 16px; }
.season-category-title { text-align: left; font-size: 14px; padding-left: 15px; }

/* Grid-Grundstruktur */
.grid-3-col, .grid-9-col, .season-link-grid {
  display: grid;
}
.grid-3-col, .season-link-grid { 
  grid-template-columns: repeat(3, 1fr); 
  background-color: rgb(255,255,220); 
/*   background-color: rgb(240,255,240);  hellblau */
}
.grid-9-col { 
  grid-template-columns: repeat(9, 1fr); 
  background-color: rgb(255,255,220); 
}

/* Startseiten-Kacheln */
.grid-3-col a, .grid-9-col a, .grid-3-col .empty-cell, .grid-9-col .empty-cell {
  color: black;
  font-size: 15px;
  text-decoration: none;
  padding: 10px 5px;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 0.5pt solid #000000;
  border-bottom: 0.5pt solid #000000;
}
.grid-3-col a:nth-child(3n), .grid-3-col .empty-cell:nth-child(3n) { border-right: none; }
.grid-9-col a:nth-child(9n) { border-right: none; }

/* Saisonseiten-Kacheln mit Leerzellen-Support */
.season-link-grid a.season-btn, .season-link-grid .empty-cell {
  color: black;
  font-size: 14px;
  text-decoration: none;
  padding: 12px 5px;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  background-color: rgb(240,255,240);
  border-right: 0.5pt solid #000000;
  border-bottom: 0.5pt solid #000000;
}
.season-link-grid a.season-btn:nth-child(3n), .season-link-grid .empty-cell:nth-child(3n) {
  border-right: none;
}
a.season-btn:hover { 
  background-color: #e2f7e2; 
  text-decoration: underline; 
}

/* --- TEXTE UNTERHALB DER NAVIGATION --- */
.welcome-box { text-align: center; margin-bottom: 20px; }
.welcome-box h1 { font-size: 21px; color: #339966; font-weight: bold; margin-bottom: 10px; }
.welcome-box p { font-size: 17px; color: black; margin: 5px 0; }
.footer-text-box { text-align: center; margin-top: 25px; font-size: 17px; color: black; line-height: 1.5; }
.quote-box { margin-top: 25px; font-size: 16px; color: #339966; font-weight: bold; }
.quote-box span { font-weight: normal; display: block; margin-top: 5px; font-size: 14px; }

/* ==========================================================================
   4. OPTIMIERUNG FÜR SMARTPHONES & TABLETS
   ========================================================================== */
@media screen and (max-width: 820px) {
  body { padding: 10px 0; }
  
  .container { 
    width: 100% !important; 
    max-width: 100%; 
    padding: 0 10px; 
    box-sizing: border-box; 
    overflow-x: auto !important; 
    -webkit-overflow-scrolling: touch;
  }
  .container-season { width: calc(100% - 20px) !important; margin: 0 10px; border-bottom: 0.5pt solid #000000; }
  
  .season-link-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .season-link-grid a.season-btn, .season-link-grid .empty-cell { border-right: 0.5pt solid #000000 !important; }
  .season-link-grid a.season-btn:nth-child(2n), .season-link-grid .empty-cell:nth-child(2n) { border-right: none !important; }
  
  .grid-3-col a, .grid-9-col a, .grid-3-col .empty-cell { border-right: 0.5pt solid #000000 !important; }
  .grid-9-col { grid-template-columns: repeat(4, 1fr) !important; }
  .grid-3-col a:nth-child(2n) { border-right: none !important; }
  .grid-9-col a:nth-child(4n) { border-right: none !important; }
}


/* ==========================================================================
   5. BILDER & TEXTBLÖCKE UNTERHALB DER TABELLEN
   ========================================================================== */
.text-block-center {
  width: 800px;
  margin: 20px auto;
  text-align: center;
  font-size: 16px;
  color: black;
  line-height: 1.5;
}

.text-block-center img {
  max-width: 100%;
  height: auto;
  border: 0.5pt solid #000000;
  margin-bottom: 3px; /* Abstand zum Text  */
}

/* Smartphone-Anpassung für den Textblock */
@media screen and (max-width: 820px) {
  .text-block-center {
    width: 100% !important;
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
  }
}


/* ==========================================================================
   6. MEISTER-ÜBERSICHTSSEITEN (Bilder & Chronik)
   ========================================================================== */
.meister-container {
  width: 800px; /* Einheitliche Breite wie Tabellen-Container */
  margin: 0 auto;
  text-align: center;
}

.meister-container h3 {
  font-size: 20px;
  color: #339966; /* Gleiches Grün wie Welcome-Box */
  margin: 25px 0 10px 0;
  font-weight: bold;
}

/* Verhindert unschöne Abstände unter den Bildern */
.meister-container img {
  max-width: 100%;
  height: auto;
  border: 0.5pt solid #000000; /* Dünner Rahmen passend zum Archiv-Stil */
  margin-bottom: 5px;
}

/* Fließtext-Absätze unter den Bildern oder Titeln */
.meister-container p {
  font-size: 15px;
  color: black;
  line-height: 1.6;
  text-align: center;
  margin: 0 auto 25px auto;
  max-width: 750px; /* Liest sich bei Textblöcken angenehmer */
}


/* ==========================================================================
   7. SPIELBERICHTEE (Kombinierte Tabellenstruktur)
   ========================================================================== */

.reports-table{
   width: 800px;
   margin: 0 auto;
   border-collapse: collapse;
}
.reports-table th, .reports-table td {
   font-family: Arial, sans-serif;
   color: black;
   border: 0.5pt solid #000000;
   padding: 6px 4.5pt;
   vertical-align: top;
}
.reports-main-title {
   font-size: 15px;
   background-color: rgb(153,255,153);
   text-align: center;
   font-weight: bold;
}
.reports-year {
   font-size: 18px;
   background-color: rgb(240,255,240);
   text-align: center;
   font-weight: bold;
}
.reports-category {
   font-size: 14px;
   background-color: rgb(240,255,240);
   text-align: center;
   font-weight: bold;
}
.reports-region {
   font-size: 14px;
   background-color: rgb(255,228,225);
   text-align: center;
   font-weight: bold;
}
.reports-liga {
   font-size: 14px;
   background-color: rgb(240,255,240);
   text-align: center;
}
.reports-match-row td {
   font-size: 14px;
   background-color: rgb(255,255,220);
}
.reports-match-date {
   width: 12%;
   text-align: left;
}
.reports-team-home, .reports-team-away {
   width: 44%;
   text-align: left;
}
.reports-footer-info {
  background-color: #E0FFFF;
  font-size: 13px;
  text-align: center;
}
@media screen and (max-width: 580px) {
  .reports-table {
  width: 100%;
  max-width: 100%;
}
}



@media screen and (max-width: 580px) {
  .season-link-grid, .grid-3-col { grid-template-columns: 1fr !important; }
  .season-link-grid a.season-btn, .grid-3-col a { border-right: none !important; }
  .season-link-grid .empty-cell, .grid-3-col .empty-cell { display: none; }
  
  .grid-9-col { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-9-col a { border-right: 0.5pt solid #000000 !important; }
  .grid-9-col a:nth-child(2n) { border-right: none !important; }
}