/* ── Year Switcher ── */
.year-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

.year-switcher__btn {
    padding: 6px 16px;
    border: 1px solid var(--dark-color, #222);
    background: #fff;
    color: var(--dark-color, #222);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all .2s ease;
    line-height: 1.4;
    border-radius: 0;
    font-family: inherit;
}

.year-switcher__btn:hover {
    background: var(--background-color-light, #f0f1f3);
    color: var(--primary-color, #d13030);
    border-color: var(--primary-color, #d13030);
}

.year-switcher__btn.is-active {
    background: var(--dark-color, #222);
    border-color: var(--dark-color, #222);
    color: #fff;
}

/* ── Race TOP-10 — dark blue, full-width ── */
.race-top10 {
    margin-top: 40px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: var(--background-color-dark, #0e3a5d);
    color: var(--light-color, #fff);
    padding: 60px 0 32px;
}

.race-top10__heading {
    text-align: left;
    max-width: 1200px;
    margin: 0 auto 28px;
    padding: 0 15px;
}

.race-top10__title {
    font-size: 32px;
    font-weight: 500;
    margin: 0 0 6px;
    color: #fff;
    font-family: var(--font-family, "Rubik", Arial, sans-serif);
}

.race-top10__title .title__highlight {
    color: var(--tertiary-color, #ffd300);
}

.race-top10__subtitle {
    font-size: 17px;
    font-weight: 400;
    color: rgba(255, 255, 255, .6);
    margin: 0;
    font-family: var(--font-family, "Rubik", Arial, sans-serif);
}

/* ── Stage ── */
.race-top10__stage {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ── Year counter (top-left) ── */
.race-top10__year-wrap {
    position: absolute;
    top: -8px;
    left: 15px;
    z-index: 2;
}

.race-top10__year {
    display: inline-block;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.8);
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
}

/* ── Bars area ── */
.race-top10__bars {
    position: relative;
    margin-bottom: 28px;
    padding-top: 56px;
}

.race-top10__item {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    transition: top .15s linear;
}

.race-top10__name {
    flex: 0 0 260px;
    font-size: 13px;
    font-weight: 400;
    font-family: var(--font-family, "Rubik", Arial, sans-serif);
    text-align: right;
    color: rgba(255, 255, 255, .85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.race-top10__track {
    flex: 1;
    display: flex;
    align-items: center;
    height: 26px;
    background: rgba(255, 255, 255, .1);
    border-radius: 3px;
    overflow: visible;
    position: relative;
}

.race-top10__fill {
    height: 100%;
    width: 0%;
    background: var(--bar-color, var(--primary-color, #d13030));
    border-radius: 3px;
    transition: width .15s linear;
    flex-shrink: 0;
    position: relative;
}

.race-top10__val {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, .7);
    white-space: nowrap;
    padding-left: 8px;
    font-variant-numeric: tabular-nums;
}

/* ── Dots ── */
.race-top10__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.race-top10__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
    cursor: pointer;
    transition: background .3s ease, transform .3s ease;
}

.race-top10__dot.is-active {
    background: var(--primary-color, #d13030);
    transform: scale(1.4);
}

/* ── Controls ── */
.race-top10__controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.race-top10__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    height: 60px;
    border: none;
    border-radius: 0;
    background: var(--primary-color, #d13030);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s ease;
    font-family: inherit;
    position: relative;
}

.race-top10__btn::before,
.race-top10__btn::after {
    position: absolute;
    content: "";
    width: 0%;
    height: 0%;
    opacity: 0;
    transition: width 0.2s linear, height 0.15s 0.2s ease-out, opacity 0s 0.35s;
}

.race-top10__btn::before {
    bottom: -5px;
    left: -6px;
    border-bottom: 1px solid #fff;
    border-left: 1px solid #fff;
}

.race-top10__btn::after {
    top: -5px;
    right: -5px;
    border-top: 1px solid #fff;
    border-right: 1px solid #fff;
}

.race-top10__btn:hover {
    background: #b82828;
}

.race-top10__btn:hover::before,
.race-top10__btn:hover::after {
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    opacity: 1;
    transition: width 0.2s 0.15s ease-out, height 0.15s ease-in, opacity 0s;
}

.race-top10__btn_done {
    display: none;
}

.race-top10.is-done .race-top10__btn_play {
    display: none;
}

.race-top10.is-done .race-top10__btn_done {
    display: inline-flex;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .race-top10 {
        padding: 28px 0 24px;
    }

    .race-top10__heading {
        padding: 0 15px;
    }

    .race-top10__stage {
        padding: 0 15px;
    }

    .race-top10__year-wrap {
        left: 15px;
    }

    .race-top10__year {
        font-size: 32px;
    }

    .race-top10__bars {
        padding-top: 44px;
    }

    .race-top10__item {
        height: auto;
        min-height: 36px;
        gap: 6px;
        align-items: flex-start;
        padding: 4px 0;
    }

    .race-top10__name {
        flex: 0 0 150px;
        font-size: 11px;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        line-height: 1.3;
    }

    .race-top10__track {
        height: 22px;
    }

    .race-top10__val {
        font-size: 12px;
        padding-left: 5px;
    }

    .race-top10__btn {
        height: 50px;
        font-size: 14px;
    }

    .year-switcher__btn {
        padding: 5px 12px;
        font-size: 13px;
    }
}