/* ====================================================
   Basis-Layout
   ==================================================== */

html, body {
    height: 100%;
    background-color: #fff;
}

body {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: space-between;
    margin: 0;
    font-family: sans-serif;
}

div.top {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

p {
    padding-left: 25px;
    padding-right: 25px;
}

/* ====================================================
   Header mit Sprach-Umschalter
   ==================================================== */

header {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 30px;
}

.lang-switch {
    font-size: 0.9em;
}
.lang-switch a,
.lang-switch strong {
    margin-left: 0.5em;
    text-decoration: none;
}
.lang-switch strong {
    color: #000;
}
.lang-switch a {
    color: #888;
}
.lang-switch a:hover {
    color: #000;
}

/* ====================================================
   Listen, Blockquote, nächste Match-Länge
   ==================================================== */

main {
    width: 100%;
    box-sizing: border-box;
}

main ul {
    margin: 0.5em 25px 1em 50px;
    padding: 0;
}
main ul li {
    margin: 0.4em 0;
}

blockquote {
    margin: 1em 25px;
    padding: 0.5em 1em;
    background: #f8f8f8;
    border-left: 3px solid #ccc;
    font-style: normal;
}

.next-length {
    margin: 1em 20px;
    padding: 0.6em 1em;
    background: #f0f0f0;
    border-left: 3px solid #888;
    font-size: 1.1em;
    text-align: center;
}

/* ====================================================
   Detailseite: Legende
   ==================================================== */

.legend {
    margin: 1em 0;
    text-align: center;
    font-size: 0.9em;
}
.legend-item {
    display: inline-flex;
    align-items: center;
    margin: 0 0.7em;
}
.legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 0.4em;
    border-radius: 2px;
}
.legend-swatch.winner-player {
    background: #4a90e2;
}
.legend-swatch.winner-opp {
    background: #f5a623;
}

/* ====================================================
   Sieger-Färbung der Match#-Zelle
   ==================================================== */

td.winner-player {
    background: #4a90e2;
    color: #fff;
    font-weight: bold;
}
td.winner-opp {
    background: #f5a623;
    color: #fff;
    font-weight: bold;
}

/* ====================================================
   Mobile
   ==================================================== */

@media only screen and (max-width: 600px) {
    header {
        padding: 8px 10px;
    }
    p {
        padding-left: 10px;
        padding-right: 10px;
    }
    .next-length,
    blockquote {
        margin-left: 10px;
        margin-right: 10px;
    }
    main ul {
        margin-left: 10px;
        margin-right: 10px;
        padding-left: 20px;
    }
}

/* Hinweis-Zeile in der Detailseiten-Tabelle:
   markiert den Übergang von Rating- zu PR-basierter Steuerung */
.styled-table tr.rule-change-row td {
    background: #fffbe6;
    color: #555;
    font-style: italic;
    font-size: 0.85em;
    text-align: center;
    padding: 8px;
    border-top: 2px dashed #d4b800;
    border-bottom: 2px dashed #d4b800;
    border-left: 1px solid #000;
    border-right: 1px solid #000;
}

/* Footer mit Datenschutz-Link unten auf jeder Seite */
.site-footer {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.85em;
    color: #888;
}
.site-footer a {
    color: #888;
    text-decoration: none;
}
.site-footer a:hover {
    color: #000;
}

/* Datenschutzseite */
main h2 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-size: 1.1em;
    padding-left: 25px;
}

@media only screen and (max-width: 600px) {
    main h2 {
        padding-left: 10px;
    }
}
/* Plattform-Hinweis neben "Gegner – hape42" auf der Detailseite.
   Etwas dezenter als der Hauptname, aber gut lesbar. */
.platform-info {
    color: #888;
    font-weight: normal;
    font-size: 0.85em;
    margin-left: 0.4em;
}

 
/* Zwischen-Überschriften für laufende/beendete Serien auf der Startseite */
.series-section-heading {
    color: #1a3a5c;
    font-size: 1.05em;
    margin: 1.8em 0 0.6em 0;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.3em;
}
 
.series-empty {
    color: #888;
    font-style: italic;
    padding: 1em;
    background: #f8f8f8;
    border: 1px dashed #ccc;
    text-align: center;
}
 
/* Klappbox für beendete Serien */
.series-finished-toggle {
    margin-top: 1.5em;
}
 
.series-finished-toggle summary {
    cursor: pointer;
    color: #1a3a5c;
    font-size: 1.05em;
    font-weight: bold;
    padding: 0.5em 0;
    border-bottom: 2px solid #e0e0e0;
    list-style: none;          /* Standard-Pfeil weg, eigenen setzen */
}
 
/* Eigener Pfeil vor dem Text – dreht sich beim Aufklappen */
.series-finished-toggle summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 0.5em;
    font-size: 0.8em;
    transition: transform 0.15s ease;
    color: #888;
}
 
.series-finished-toggle[open] summary::before {
    transform: rotate(90deg);
}
 
/* Webkit-Browser haben ein Standard-Dreieck, das ausblenden */
.series-finished-toggle summary::-webkit-details-marker {
    display: none;
}
 
.series-finished-toggle summary:hover {
    color: #234e7a;
}
 
/* PR-Stufen Farben (nach PR-Wert):
   < 2.5  Weltmeister         → kräftiges Grün
   < 5.0  Weltklasse          → helleres Grün
   < 7.5  Experte             → Lime
   < 12.5 Fortgeschrittener   → Hellgelb
   < 17.0 Amateur             → Orange
   < 24.0 Gelegenheitsspieler → Rot-Orange
   ≥ 24.0 Anfänger            → Kräftiges Rot
   Schwarze Schrift überall (wie im Original-Header). */
 
td.pr-weltmeister     { background-color: #4caf50; color: #000; }
td.pr-weltklasse      { background-color: #8bc34a; color: #000; }
td.pr-experte         { background-color: #cddc39; color: #000; }
td.pr-fortgeschritten { background-color: #ffd54f; color: #000; }
td.pr-amateur         { background-color: #ff9800; color: #000; }
td.pr-gelegenheit     { background-color: #f4511e; color: #000; }
td.pr-anfaenger       { background-color: #d32f2f; color: #000; }
 
/* PR-Skala Legende oben auf der Detailseite */
.pr-legend {
    margin: 1em auto;
    padding: 0.6em 1em;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    font-size: 0.85em;
    max-width: 1100px;
}
.pr-legend-label {
    font-weight: bold;
    color: #555;
    margin-right: 0.5em;
}
.pr-legend-items {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4em 0.8em;
    align-items: center;
}
.pr-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    white-space: nowrap;
}
.pr-legend-swatch {
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}
.pr-legend-swatch.pr-weltmeister     { background-color: #4caf50; }
.pr-legend-swatch.pr-weltklasse      { background-color: #8bc34a; }
.pr-legend-swatch.pr-experte         { background-color: #cddc39; }
.pr-legend-swatch.pr-fortgeschritten { background-color: #ffd54f; }
.pr-legend-swatch.pr-amateur         { background-color: #ff9800; }
.pr-legend-swatch.pr-gelegenheit     { background-color: #f4511e; }
.pr-legend-swatch.pr-anfaenger       { background-color: #d32f2f; }
.pr-legend-limit {
    color: #888;
    font-size: 0.85em;
}
  