@font-face {
    font-family: 'Zen Dots';
    src: url(drivers-standings/Zen_Dots/ZenDots-Regular.ttf);
}

@font-face {
    font-family: 'DM_Serif_Text';
    src: url(drivers-standings/DM_Serif_Text/DMSerifText-Regular.ttf);
}

@font-face {
    font-family: 'Sansation';
    src: url(drivers-standings/Sansation/Sansation-Bold.ttf);
}

@font-face {
    font-family: 'Outfit';
    src: url(drivers-standings/Outfit/Outfit-VariableFont_wght.ttf);
}

@font-face {
    font-family: 'Alfa_Slab_One';
    src: url(drivers-standings/Alfa_Slab_One/AlfaSlabOne-Regular.ttf);
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    background-color: #303030;
}

header {
    width: max-content;
    height: 3.8rem;
    position: fixed;
    left: 50%;
    top: 1rem;
    transform: translate(-50%);
    background-color: #3a3a3aef;
    border-radius: 2rem;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    box-shadow: 0 0 15px rgb(46, 46, 46);
    z-index: 2000;
}

.logos {
    height: 100%;
    padding: 0 0 0 0.5rem;
    position: relative;
    width: fit-content;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.3rem;
    overflow: hidden;
}

.logos img {
    width: 5rem;
    height: auto;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

.logos:first-child {
    border-radius: 2rem 0 0 2rem;
}

.logos::after {
    content: "";
    margin: 0 0 0 0.5rem;
    width: 1px;
    height: 2rem;
    background-color: gray;
}

.logos:hover .shine {
    display: initial;
}

.shine {
    display: none;
    position: absolute;
    top: 0;
    left: -75%;
    /* start off-screen */
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    animation: shineMove 1.2s ease;
    pointer-events: none;
}

@keyframes shineMove {
    0% {
        left: -75%;
    }

    100% {
        left: 125%;
    }
}

.menu {
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.standings {
    height: 100%;
    position: relative;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Outfit';
    font-size: 1.2rem;
    color: #e2e2e2;
    cursor: default;
    transition: all 0.3s ease;
}

.standings p {
    margin: 0;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

.standings img {
    width: 0.8rem;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

.standings:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.standings:hover img {
    animation: dropdown 0.3s ease forwards;
}

@keyframes dropdown {
    from {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(-90deg);
    }
}

.standings:hover .standings-show a {
    display: initial;
}

.standings:hover .standings-show {
    animation: standings-show 0.3s ease forwards;
}

@keyframes standings-show {
    from {
        height: 0;
    }

    to {
        height: 6.1rem;
    }
}


.standings .standings-show {
    height: 0;
    display: flex;
    position: absolute;
    top: 3.8rem;
    left: 0;
    background-color: #3a3a3aef;
    flex-direction: column;
    align-items: stretch;
    gap: 1px;
    border-radius: 0 0 0.5rem 0.5rem;
    border-top: 1px solid gray;
    overflow: hidden;
}

.standings-show a {
    padding: 0.5rem 0.7rem;
    display: none;
    white-space: nowrap;
    text-decoration: none;
    color: #e2e2e2;
    line-height: 2rem;
}

.standings-show a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.race-results {
    height: 100%;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    font-family: 'Outfit';
    font-size: 1.2rem;
    color: #e2e2e2;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

.race-results:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.season-2025 {
    height: 100%;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-family: 'Outfit';
    font-size: 1.2rem;
    color: #e2e2e2;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 0 2rem 2rem 0;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

.new-tab {
    width: 0.9rem;
    height: 0.9rem;
    fill: currentColor;
    vertical-align: middle;
}

.season-2025:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader .container {
    width: 12rem;
    height: 12rem;
    margin: auto;
    background-color: white;
    border-radius: 1rem;
    font-family: sans-serif;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.loader .spinner {
    width: 3rem;
    height: 3rem;
    border: 5px solid #ddd;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.grid-img {
    position: relative;
    width: 100%;
    height: fit-content;
    overflow: hidden;
}

.grid-img img {
    width: 100%;
    height: 50rem;
    image-rendering: optimizeSpeed;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

.grid-img h1 {
    width: 100%;
    height: 10rem;
    text-align: center;
    background-color: #46464686;
    backdrop-filter: blur(10px);
    position: absolute;
    bottom: -4rem;
    left: 50%;
    transform: translate(-50%);
    color: #ac0303;
    font-size: 5rem;
    font-weight: 600;
    font-family: 'Zen Dots';
    white-space: nowrap;
    padding-top: 1rem;
    z-index: 1000;
    cursor: default;
}

main {
    width: 95%;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.podiums {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.7rem;
    margin: 0;
    padding: 1rem 0;
}

.first,
.second,
.third {
    width: 100%;
    max-width: 70rem;
    display: flex;
    flex-direction: column;
    font-family: 'Sansation';
    color: #d3d3d3;
}

.first .div1 {
    border: 3px solid #FEE101;
    box-shadow: 0 0 10px #FEE101;
}

.second .div1 {
    border: 3px solid #D7D7D7;
    box-shadow: 0 0 10px #D7D7D7;
}

.third .div1 {
    border: 3px solid #CD7F32;
    box-shadow: 0 0 10px #CD7F32;
}

.div1 {
    width: 100%;
    box-sizing: border-box;
    background-color: #464646;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    padding: 1rem;
    border-radius: 3rem;
    overflow: hidden;
}

.div1.active {
    animation: div1 0.1s ease forwards;
}

.div1.close {
    animation: div1-close 0.5s ease-out forwards;
}

@keyframes div1 {
    from {
        border-radius: 3rem;
    }

    to {
        border-radius: 3rem 3rem 0 0;
    }
}

@keyframes div1-close {
    from {
        border-radius: 3rem 3rem 0 0;
    }

    to {
        border-radius: 3rem;
    }
}

.div1 .driver-pic {
    padding: 0.3rem 0.3rem 0 0;
    background-color: #a31515;
    width: 5rem;
    height: 5rem;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
    display: block;
}

#javad-driver-pic {
    background-color: #ed1131;
}

#leclerc-driver-pic {
    background-color: #ed1131;
}

#hamilton-driver-pic {
    background-color: #00d6b5;
    padding: 0.3rem 0 0 0;
    width: 5.3rem;
}

.div1 .driver-name-nation {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    font-family: 'DM_Serif_Text';
    font-size: 1.8rem;
    white-space: nowrap;
    text-shadow: 2px 2px 2px #303030;
    padding: 0 0.7rem;
}

.div1 .driver-name-nation img {
    width: 2rem;
    display: block;
}

.div1 .team {
    flex: 1;
    width: max-content;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
    font-size: 1.4rem;
    white-space: nowrap;
    padding: 0 0.7rem;
}

.div1 .team img {
    width: 2rem;
    display: block;
}

.div1 .points {
    width: max-content;
    font-size: 1.5rem;
    padding: 0 0.7rem;
    white-space: nowrap;
}

.div1 .dropdown {
    padding: 0.5rem;
    width: 1.3rem;
    display: block;
    transform: rotate(-90deg);
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

.div1 .dropdown:hover {
    background-color: #30303096;
}

.div1 .dropdown.active {
    background-color: #30303096;
    animation: podium-dropdown 0.3s ease forwards;
}

.div1 .dropdown.close {
    background-color: initial;
    animation: podium-dropdown-close 0.3s ease forwards;
}

.div1 .dropdown.close:hover {
    background-color: #30303096;
}

@keyframes podium-dropdown {
    from {
        transform: rotate(-90deg);
    }

    to {
        transform: rotate(90deg);
    }
}

@keyframes podium-dropdown-close {
    from {
        transform: rotate(90deg);
    }

    to {
        transform: rotate(-90deg);
    }
}

.div2 {
    width: 100%;
    height: 0;
    box-sizing: border-box;
    background-color: #616161;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.2rem;
    border-radius: 0 0 3rem 3rem;
    overflow: hidden;
}

.div2.active {
    animation: div2 0.3s ease forwards;
}

.div2.close {
    animation: div2-close 0.3s ease-out forwards;
}

@keyframes div2 {
    from {
        height: 0;
        padding: 0;
    }

    to {
        height: 13rem;
        padding: 1rem 0;
    }
}

@keyframes div2-close {
    from {
        height: 13rem;
        padding: 1rem 0;
        opacity: 1;
    }

    to {
        height: 0;
        padding: 0;
        opacity: 0;
    }
}

.div2 p {
    margin: 0;
}

.div2 .stats-header {
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
}

.div2 .row1,
.div2 .row2,
.div2 .row3 {
    width: 75%;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: space-between;

}

.non-podiums {
    width: 100%;
    padding: 1rem 0;
    margin: 0;
    border-top: 2px solid gray;
}

.non-podiums table {
    width: 100%;
    max-width: 70rem;
    margin: auto;
    border-radius: 0.7rem;
    background-color: #141414c5;
    border-collapse: collapse;
    overflow: hidden;
}

.non-podiums table tr {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    color: #e2e2e2;
    font-family: 'Alfa_Slab_One';
    border-bottom: 1px solid gray;
}

.non-podiums table tr:last-child {
    border-bottom: unset;
}

.non-podiums table td {
    font-size: 1rem;
    letter-spacing: 1px;
    padding: 0.7rem 2rem;
    white-space: nowrap;
}

.non-podiums p {
    margin: 0;
}

.non-podiums .position {
    width: 1rem;
    font-size: 1.1rem;
}

.non-podiums .driver-name-nation {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
}

.non-podiums .driver-name-nation img {
    width: 1.7rem;
}

.non-podiums .team {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
}

.non-podiums .team img {
    width: 2rem;
}

.non-podiums .points {
    font-size: 1.1rem;
}

@media (max-width:768px) {
    .grid-img h1 {
        font-size: 2.3rem;
    }

    .div1 .driver-pic {
        display: none;
    }

    .div1 .driver-name-nation {
        font-size: 1.5rem;
    }

    .div1 .driver-name-nation img {
        width: 1.7rem;
    }

    .div1 .team {
        font-size: 1.3rem;
    }

    .div1 .team img {
        width: 1.7rem;
    }

    .non-podiums table td {
        font-size: 0.9rem;
    }

    .non-podiums .position {
        font-size: 1rem;
    }

    .non-podiums .points {
        font-size: 1rem;
    }
}

@media (max-width:650px) {
    .logos img[alt="fia"] {
        display: none;
    }

    .grid-img h1 {
        font-size: 1.9rem;
    }

    .div1 .driver-name-nation {
        font-size: 1.3rem;
    }

    .div1 .points {
        font-size: 1.3rem;
    }

    .div1 .team {
        font-size: 1rem;
    }

    .div1 .team img {
        width: 1.5rem;
    }

    .div2 .row1,
    .div2 .row2,
    .div2 .row3 {
        width: 85%;
    }

    .non-podiums table td {
        font-size: 0.8rem;
        padding: 0.7rem 1rem;
    }

    .non-podiums .position {
        font-size: 0.9rem;
    }

    .non-podiums .driver-name-nation img {
        width: 1.3rem;
    }

    .non-podiums .team img {
        width: 1.5rem;
    }

    .non-podiums .points {
        font-size: 0.9rem;
    }
}

@media (max-width:415px) {
    .logos img {
        width: 3rem;
    }

    .logos::after {
        margin: 0 0 0 0.1rem;
    }

    .standings {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .standings img {
        width: 0.7rem;
    }

    .race-results {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .season-2025 {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .grid-img h1 {
        font-size: 1.4rem;
    }

    .div1 .driver-name-nation {
        font-size: 1.1rem;
    }

    .div1 .team {
        display: none;
    }

    .div1 .points {
        font-size: 1.1rem;
    }

    .non-podiums .team {
        display: none;
    }
}