main {
    background-color: #0a0a0a;
    height: auto;
    min-height: calc(100vh - 70px);
    padding-top: 20px;
    padding-bottom: 50px;
}

section, #races {
    background-color: #111111;
    border: 1px solid #333333;
    width: 90%;
    margin: 20px auto;
    border-radius: 5px;
    padding: 10px;
}

#races {
    width: calc(90% + 20px);
    display: none;
}

h1, h2, h3, #races th {
    margin: 20px 0;
    font-family: 'Antonio', sans-serif;
    font-weight: bolder;
    font-size: 1.5em;
    color: white;
    line-height: 0.95;
}

h2 { font-weight: normal; }

h1 span, h2 span {
    color: #9f9f9f;
    margin-bottom: 5px;
    font-size: 0.8em;
    display: block;
    font-weight: bold;
}

#user-details h1 span {
    width: calc(100% - 5px);
    min-height: 1px;
    background-color: #9f9f9f;
    margin: 0 auto;
}

h3, #races th {
    color: #9f9f9f;
    font-size: 1em;
    margin: 5px 0;
}

.info p, .race {
    color: white;
    font-family: Inter, sans-serif;
    margin: 0;
}

.info { margin: 15px 0; }

#SR div, #AR div {
    border-radius: 5px;
    padding: 3px;
    color: black;
    font-family: Inter, sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    margin: 0;
    width: 300px;
    height: 25px;
    line-height: 25px;
}

#F { background-color: #595959; }
#E { background-color: #ff0000; }
#D { background-color: #ffc000; }
#C { background-color: #ffff00; }
#B { background-color: #00b050; }
#A { background-color: #00b0f0; }

#previousPage img { width: 75px; }

.race { text-align: center; }

#races th, #races td {
    border-bottom: 1px solid #333333;
    padding: 5px;
    border-collapse: collapse;
}

.race a { color: #d92027; }

#ud {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.team-color-stripe {
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    border-radius: 0;
}

.nationality {
    font-family: Inter, sans-serif;
}

details {
    font-size: 1em;
    font-family: 'Antonio', sans-serif;
    font-weight: bolder;
    line-height: 0.95;
    background-color: #111111;
    border: 1px solid #333333;
    width: 90%;
    margin: 5px auto;
    color: white;
    padding: 10px;
    border-radius: 8px;
}

details summary, details div { color: white; }
details summary { font-size: 1.2em; }
details[open] summary { margin-bottom: 5px; }

details div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

details div p {
    margin: 5px 0;
    font-weight: normal;
}

details a {
    color: #d92027;
    border: none;
    background: none;
    padding: 0;
    width: 100%;
    display: block;
    text-align: left !important;
    font-size: 1.1em;
    margin: 5px 0;
    text-decoration: none;
}

@media (min-width: 600px) {
    #stats2 .info { text-align: right; }
    #races { display: table; }
    details { display: none; }
}

/* ── Team header layout ── */

.team-header-section {
    position: relative;
    overflow: hidden;
    padding: 0 !important;
}

/* Mobiel: logo boven tekst */
.team-header-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.team-header-text {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    order: 2;
}

/* ── Team logo ── */

.team-logo-wrap {
    order: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 14px 16px 0;
    overflow: hidden;
}

.team-logo {
    width: 150px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

/* Desktop: logo rechts naast tekst */
@media (min-width: 600px) {
    .team-header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: 140px;
    }

    .team-header-text {
        order: 1;
    }

    .team-logo-wrap {
        margin-right: 50px;
        order: 2;
        flex-shrink: 0;
        width: 220px;
        min-height: 140px;
        align-self: stretch;
        padding: 0;
        justify-content: center;
    }

    .team-logo {
        width: 100%;
        height: 100%;
        padding: 14px;
    }
}

