table {
    border: 1px solid black;
    display: block;
    overflow: auto;
    /* float: left; */
    clear: left;
    border-bottom: none;
    border-collapse: collapse
}

thead {
    border: 1px solid black;
}

tbody {
    border: 1px solid black;
    
}

th {
    border: 1px solid black;
}

td {
    border-top: 1px solid black;
    padding: 2px 3px;
}

.resultTD {
    text-align: center;
}

.champPos {
    text-align: center;
}

.champPosChanged {
    text-align: center;
}

.total {
    text-align: right;
    border-right: 1pt solid black;
}

.driverName {
    text-align: left;
}

.raceName {
    text-align: center;
}

.realRow td {
    background-color: #eaecf0;
    /* border-top: 1pt solid red;
    border-left: 1pt solid red; */
    color: red !important;
}

/* .realRowTD {
    background-color: #eaecf0;
    border: 1pt solid red;
} */

.header {
    margin: 5px;
}

.headerDiv {
    display: inline-block;
    margin: 10px 20px;
}

td:not(.realRowTD) {
    border-top: 1pt solid black;
}


.stickyTD {
    position: -webkit-sticky;
    position: sticky;
}















body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
    color: #333;
}

#header {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 20px;
    align-items: center;
}

.headerDiv {
    display: flex;
    align-items: center;
}

.headerDiv label {
    margin-right: 8px;
    font-weight: bold;
}

.headerDiv select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.headerDiv input[type="submit"] {
    background-color: #5cb85c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.headerDiv input[type="submit"]:hover {
    background-color: #4cae4c;
}

.headerDiv input[type="checkbox"] {
    margin-right: 5px;
}

p {
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #555;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    /* overflow: hidden; To contain the border-radius for sticky elements */
}

th, td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    font-size: 0.9em;
}

thead {
    background-color: #343a40;
    color: white;
}

th[colspan] {
    background-color: #495057;
}

.raceName {
    font-weight: normal;
}

.stickyTD {
    background-color: #f8f9fa;
    position: sticky;
    left: 0;
    z-index: 1;
    text-align: left;
}

.driverName {
    font-weight: bold;
}

.champPos {
    font-size: 1.1em;
    font-weight: bold;
}

.champPosChanged {
    font-size: 0.8em;
    padding: 5px;
    border-radius: 5px;
}

.resultTD {
    font-weight: bold;
}

.total {
    font-weight: bold;
    background-color: #f0f0f0;
    

    position: sticky;
    right: 0;
    z-index: 1;
}

.realRowTD {
    color: #777;
    font-size: 0.85em;
}

.realRow {
    background-color: #f9f9f9;
}

b {
    color: #007bff;
}

@media (max-width: 768px) {
    #header {
        flex-direction: column;
        align-items: flex-start;
    }

    .headerDiv {
        margin-bottom: 10px;
        width: 100%;
    }

    .headerDiv select,
    .headerDiv input[type="submit"] {
        width: 100%;
    }

    table {
        overflow-x: auto;
        display: block;
    }

    th, td {
        min-width: 80px; /* Ensure columns don't collapse too much */
    }

    .stickyTD {
        left: 0;
        background-color: #f8f9fa;
        z-index: 1;
    }
}