.floating-link-content {
    padding-right: 5px;
    padding-left: 5px;
    opacity: 100%;
    color: white;

}

.nav-link {
    position: relative;
    z-index: 1;
}


.floating-link-body {
    text-align: center;
    position: fixed;
    top: 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(3px);
    row-gap: 10px;
    width: 300px;
    padding: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);     /* soft shadow = it floats above */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    z-index: 1000;

}

.floating-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


body {
    background-color: #232330;


}

.race-grid-main {
    margin-top: 4em;
}

.standing-grid-main {

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 2fr));
    max-width: 120em;
    margin: 0 auto;
    -ms-grid-column-align: center;
    grid-column: auto;
    justify-content: center;
    justify-items: center;
    gap: 40px;

}


.race-grid-centering {
    display: flex;
    justify-items: center;
    justify-content: center;
    align-items: center;
}

.race-grid-content {
    margin-top: 60px;
    height: 18em;
    width: 18em;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.driver-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
}

.driver-header-image {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background-size: cover;        /* ← fill the circle, don't squish */
    background-position: center;   /* ← center the face in the circle */
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.driver-header-name {
    color: azure;
    font-family: 'Formula1', sans-serif;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;

}

.driver-team-main {
    display: flex;
    border-radius: 10px;
    margin-left: auto;
    margin-right: auto;
}

.driver-team-name {
    color: azure;
    width: 100px;
    height: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-family: 'Formula1', sans-serif;
    font-weight: bold;

}

.nav-link {

    font-family: 'Formula1', sans-serif;
    font-weight: bold;

}

.nav-link:link,
.nav-link:visited {
    color: azure;
    text-decoration: none;
}

.stats-box {

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    align-content: center;
    gap: 18px;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);     /* soft shadow = it floats above */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px;
    height: 10.5em;

}

.stats-position-box {
    width: 5.8em;
    height: 5.8em;
    text-align: center;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
    justify-items: center;
}

.stats-position-box-text {
    color: whitesmoke;
    font-size: 1.4em;
    font-family: 'Formula1', sans-serif;
    letter-spacing: 1px;
}

.stats-position-box-divider {
    width: 7em;
    height: .15em;
    background-color: rgb(179 179 179 / 0.51);
    backdrop-filter: blur(3px);
    border-radius: .1em;

}

.stats-driver-points-box-divider {
    width: 7em;
    height: .15em;
    background-color: rgb(179 179 179 / 0.51);
    backdrop-filter: blur(3px);
    border-radius: .1em;

}


.driver-position-small-box {
    display: flex;
    flex-direction: row;
    margin-top: .5em;
}

.driver-position-ordinal {
    color: rgb(245 245 245 / 0.75);
    font-size: 2em;
}

.stats-driver-points-box {
    width: 5.8em;
    height: 5.8em;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
    justify-items: center;
}

.stats-driver-points-box-text {
    color: whitesmoke;
    font-size: 1.3em;
    font-family: 'Formula1', sans-serif;
    letter-spacing: 1px;
}


.stats-box-divider {
    width: .15em;
    height: 8em;
    background-color: rgb(179 179 179 / 0.51);
    backdrop-filter: blur(3px);
    border-radius: .1em;
}

.stats-driver-points {
    font-size: 2.8em;
    color: rgb(245 245 245 / 0.95);
    margin-top: .22em;

}

.stats-driver-position {
    color: rgb(245 245 245 / 0.95);
    font-size: 3em;
}

.driver-header-name-div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: flex-end;
    align-items: center;

}

* {
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .race-grid-main {

    }

    .standing-grid-main {

        grid-template-columns: repeat(2, minmax(0, 1fr));  /* 2 cards per row */
        gap: 15px;
        padding: 15px;
        margin-top: 50px;

    }

    .race-grid-content {
        width: 100%;
        height: auto;        /* size to content */
        margin-top: 0;
        display: flex;

        gap: 20px;
        padding: 10px;
    }

    .driver-header {
        height: 30%;
        gap: 10px;    /* reasonable gap, not too much */
        align-items: center;
    }

    .driver-header-name-div {
        flex: 1;       /* name area fills remaining space */
        min-width: 0;

    }

    .driver-header-image {
        width: 45px;
        height: 45px;
    }

    .driver-header-name {
        font-size: 0.73em;
        letter-spacing: 1px;
    }

    .driver-team-name {
        width: auto;         /* was 100px — let it shrink */
        font-size: 0.7em;
    }

    .driver-team-main {
        padding: 4px;
    }

    .stats-box {
        width: auto;
        height: auto;
        padding: 8px;
        gap: 18px;
        display: flex;
        justify-content: center;
        align-items: stretch;
    }

    .stats-position-box,
    .stats-driver-points-box {
        width: auto;         /* was 6em — let them fit */
        height: 100%;
        justify-content: center;
        align-items: center;
        display: flex;
    }

    .stats-position-box-text,
    .stats-driver-points-box-text {
        font-size: 0.8em;
    }

    .stats-driver-position{
        font-size: 1.6em;    /* smaller numbers */
    }

    .stats-driver-points {
        font-size: 1.6em;
    }

    .stats-position-box-divider,
    .stats-driver-points-box-divider {
        width: 3em;         /* was 5em — shrink the underlines */
    }

    .stats-box-divider {
        height: 4em;
        width: .1em;
    }

    .driver-position-small-box {
        display: flex;
        flex-direction: row;
        margin-top: 5px;
    }

    .driver-position-ordinal {
        color: rgb(245 245 245 / 0.75);
        font-size: 1em;
    }

    * {
        box-sizing: border-box;
    }
}