/* ==========================================
   TIVOLISCORE
   SPIELERHISTORIE
========================================== */

* {
    box-sizing: border-box;
}


/* ==========================================
   BODY
========================================== */

body {
    margin: 0;
    padding: 20px;

    font-family: Arial, Helvetica, sans-serif;

    background: #f3f6fa;

    color: #222;
}


/* ==========================================
   HAUPTCONTAINER
========================================== */

.historie-container {
    width: 100%;
    max-width: 1600px;

    margin: 0 auto;
}


/* ==========================================
   ÜBERSCHRIFT
========================================== */

.historie-container h1 {
    margin: 0 0 8px 0;

    text-align: center;

    color: #0A4EA3;

    font-size: 28px;
}


/* ==========================================
   SPIELERNAME
========================================== */

.historie-spieler {
    margin-bottom: 20px;

    text-align: center;

    font-size: 20px;
    font-weight: bold;

    color: #222;
}


/* ==========================================
   SCROLLBEREICH
========================================== */

.historie-scroll {
    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    background: #ffffff;

    border-radius: 14px;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.08);

    -webkit-overflow-scrolling: touch;
}


/* ==========================================
   TABELLE – KOMPAKT
========================================== */

.historie-table {
    width: max-content;
    min-width: 0;
    margin: 0;

    border-collapse: separate;
    border-spacing: 0;
}


/* ==========================================
   TABELLENKOPF
========================================== */

.historie-table th {
    background: #0A4EA3;

    color: #ffffff;

    padding: 8px 3px;

    text-align: center;

    font-size: 12px;

    white-space: nowrap;
}


/* ==========================================
   DATUM
========================================== */

.historie-table th .datum {
    display: block;

    margin-top: 2px;

    font-size: 8px;

    font-weight: normal;

    white-space: nowrap;
}


/* ==========================================
   TABELLENZELLEN
========================================== */

.historie-table td {
    padding: 7px 3px;

    text-align: center;

    border-bottom: 1px solid #e5e5e5;

    font-size: 13px;

    white-space: nowrap;
}


/* ==========================================
   BAHN-SPALTE
========================================== */

.historie-table .bahn {
    width: 40px;
    min-width: 40px;
    max-width: 40px;

    text-align: center;

    font-weight: bold;
}


/* ==========================================
   RUNDEN-SPALTEN
========================================== */

.historie-table .runde,
.historie-table .score {
    width: 50px;
    min-width: 50px;
    max-width: 50px;

    text-align: center;
}


/* ==========================================
   SCORE
========================================== */

.historie-table .score {
    font-weight: bold;
}


/* ==========================================
   ABWECHSELNDE ZEILEN
========================================== */

.historie-table tbody tr:nth-child(even) {
    background: #f8fbff;
}


/* ==========================================
   TOTAL-ZEILE
========================================== */

.historie-table .total-zeile td {
    border-top: 2px solid #0A4EA3;

    border-bottom: none;

    font-weight: bold;
}


/* ==========================================
   TOTAL – GRUNDEINSTELLUNG
========================================== */

.historie-table .total {
    font-size: 14px;
    font-weight: bold;
    color: #0A4EA3 !important;
    background: #eef5ff;
}


/* ==========================================
   TOTAL – BLAU
========================================== */

.historie-table .total-blau {
    background: #0A4EA3 !important;

    color: #ffffff !important;
}


/* ==========================================
   TOTAL – GRÜN
========================================== */

.historie-table .total-gruen {
    background: #198754 !important;

    color: #ffffff !important;
}


/* ==========================================
   TOTAL – ROT
========================================== */

.historie-table .total-rot {
    background: #dc3545 !important;

    color: #ffffff !important;
}


/* ==========================================
   TOTAL – SCHWARZ
========================================== */

.historie-table .total-schwarz {
    background: #222222 !important;

    color: #ffffff !important;
}


/* ==========================================
   LEERE HISTORIE
========================================== */

.historie-leer {
    max-width: 500px;

    margin: 30px auto;

    padding: 20px;

    background: #ffffff;

    border-radius: 12px;

    text-align: center;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.08);
}


/* ==========================================
   SCROLLBAR
========================================== */

.historie-scroll::-webkit-scrollbar {
    height: 10px;
}


.historie-scroll::-webkit-scrollbar-track {
    background: #e5eaf2;

    border-radius: 10px;
}


.historie-scroll::-webkit-scrollbar-thumb {
    background: #0A4EA3;

    border-radius: 10px;
}


/* ==========================================
   TABLET
========================================== */

@media (max-width: 900px) {

    body {
        padding: 15px;
    }


    .historie-container h1 {
        font-size: 24px;
    }


    .historie-spieler {
        font-size: 18px;
    }

}


/* ==========================================
   HANDY
========================================== */

@media (max-width: 650px) {

    body {
        padding: 10px;
    }


    .historie-container h1 {
        font-size: 22px;

        margin-bottom: 6px;
    }


    .historie-spieler {
        margin-bottom: 12px;

        font-size: 17px;
    }


    /* ------------------------------------------
       BAHN
    ------------------------------------------ */

    .historie-table .bahn {
        width: 40px;
        min-width: 40px;
        max-width: 40px;
    }


    /* ------------------------------------------
       RUNDEN
    ------------------------------------------ */

    .historie-table .runde,
    .historie-table .score {
        width: 50px;
        min-width: 50px;
        max-width: 50px;
    }


    /* ------------------------------------------
       KOPF
    ------------------------------------------ */

    .historie-table th {
        padding: 7px 2px;

        font-size: 11px;
    }


    /* ------------------------------------------
       DATUM
    ------------------------------------------ */

    .historie-table th .datum {
        margin-top: 2px;

        font-size: 7px;
    }


    /* ------------------------------------------
       ZELLEN
    ------------------------------------------ */

    .historie-table td {
        padding: 7px 2px;

        font-size: 12px;
    }


    /* ------------------------------------------
       TOTAL
    ------------------------------------------ */

    .historie-table .total {
        font-size: 13px;
    }
/* ==========================================
   ZURÜCK ZUM SPIELERKONTO
========================================== */

.historie-zurueck {
    text-align: center;
    margin-top: 25px;
}

.historie-zurueck a {
    display: inline-block;
    padding: 9px 16px;

    background: #0A4EA3;
    color: #ffffff;

    text-decoration: none;
    border-radius: 7px;

    font-size: 13px;
    font-weight: bold;
}

.historie-zurueck a:hover {
    background: #083d82;
}
}

/* ==========================================
   SPIELERHISTORIE – VIELE RUNDEN
   Bahn bleibt links sichtbar, Rundenspalten scrollbar
========================================== */
.historie-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
}

.historie-table {
    min-width: max-content;
    border-collapse: separate;
    border-spacing: 0;
}

.historie-table .bahn {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #ffffff;
    box-shadow: 3px 0 5px rgba(0,0,0,.08);
}

.historie-table thead .bahn {
    z-index: 5;
    background: #0A4EA3;
}

.historie-table tbody tr:nth-child(even) .bahn {
    background: #f7f9fc;
}

.historie-table .runde,
.historie-table .score {
    min-width: 52px;
    width: 52px;
    white-space: nowrap;
}

/* Auf kleinen Bildschirmen etwas breiter, damit die Werte gut lesbar bleiben */
@media (max-width: 650px) {
    .historie-scroll {
        overflow-x: scroll;
    }

    .historie-table .runde,
    .historie-table .score {
        min-width: 50px;
        width: 50px;
    }
}
