@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

* {
    -webkit-tap-highlight-color: transparent;
}

*:focus {
    outline: none !important;
}

:root {
    --bg: #F9F9F9;
    --text: #1a1a1a;
    --text2: #555;
    --text3: #999;
    --accent: #0041FF;
    --accent-dark: #0034CC;
    --green: #28a745;
    --gold: #e6a817;
    --silver: #8a8a8a;
    --bronze: #b87333;
    --border: #e0e0e0;
    --bg-alt: #ffffff;
    --font-h: 'Outfit', sans-serif;
    --font: 'Inter', sans-serif;
    --radius: 10px;
    --max-w: 1100px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-dark);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* bg-glow — скрываем */
.bg-glow {
    display: none;
}

/* ═══ NAVBAR (Row 1 — fixed) ═══ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2005;
    background: #F9F9F9;
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-w);
    margin: 0 auto;
    height: 56px;
}

.navbar__logo {
    display: inline-flex;
    align-items: center;
    background: #0041FF;
    padding: 8px 12px;
    border-radius: 2px;
    flex-shrink: 0;
    transition: opacity 0.2s;
    margin-left: 25px;
}

.navbar__logo:hover {
    opacity: 0.95;
}

.navbar__logo img {
    height: 24px;
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}

.navbar__links a {
    color: var(--text2);
    font-weight: 500;
    font-size: 0.82rem;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.15s;
    white-space: nowrap;
}

.navbar__links a:hover {
    color: var(--text);
    background: var(--bg-alt);
}

.navbar__links a.active {
    color: var(--accent);
    font-weight: 600;
}

.navbar__cta {
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    font-size: 0.82rem !important;
}

.navbar__cta:hover {
    background: var(--accent-dark) !important;
    color: #fff !important;
}

.navbar__burger {
    display: none;
    flex-direction: column;
    gap: 7px;
    cursor: pointer;
    padding: 8px 0;
    z-index: 1001;
}

.navbar__burger span {
    display: block;
    width: 32px;
    height: 1.5px;
    background: #000;
    border-radius: 0;
    transition: all 0.2s;
}

.navbar__burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar__burger.active span:nth-child(2) {
    opacity: 0;
}

.navbar__burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -8px);
}

/* ═══ STAGE BAR (Row 2 — под навбаром) ═══ */
.stage-bar {
    margin-top: 56px;
    background: #fff;
    padding: 12px 0;
    min-height: 85px;
    display: flex;
    align-items: center;
}

.stage-bar__inner {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

.stage-bar__logo-box {
    flex-shrink: 0;
    margin-right: 20px;
}

.stage-bar__logo-box img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.stage-bar__divider {
    width: 1px;
    height: 48px;
    background: #eeeeee;
    margin: 0 24px;
}

.stage-bar__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.stage-bar__event-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 0.88rem;
    font-weight: 400;
}

.stage-bar__event-date svg {
    color: #aaa;
}

.stage-bar__name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a1a;
    font-family: var(--font-h);
}

.stage-bar__spacer {
    flex-grow: 1;
}

.stage-bar__weather {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stage-bar__weather-val {
    font-size: 1.55rem;
    font-weight: 600;
    font-family: var(--font-h);
    color: #1a1a1a;
}

.stage-bar__weather-icon {
    font-size: 1.95rem;
    line-height: 1;
}

.stage-bar__countdown {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 24px;
}

.stage-bar__cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 44px;
}

.stage-bar__cd-num {
    font-size: 1.75rem;
    font-weight: 600;
    font-family: var(--font-h);
    color: #1a1a1a;
    line-height: 1;
}

.stage-bar__cd-label {
    font-size: 0.7rem;
    color: #555;
    margin-top: 2px;
}

.stage-bar__cd-sep {
    font-size: 1.35rem;
    font-weight: 600;
    color: #A0AEC0;
    margin-bottom: 18px;
    /* Поднимаем двоеточия ближе к цифрам */
}

@media screen and (max-width: 1024px) {
    .stage-bar__inner {
        gap: 10px;
    }

    .stage-bar__divider {
        margin: 0 16px;
    }

    .stage-bar__countdown {
        padding-left: 16px;
    }
}

@media screen and (max-width: 900px) {
    .navbar__logo {
        margin-left: 0;
    }

    .stage-bar {
        padding: 0;
        border-bottom: 1px solid #f5f5f5;
    }

    .stage-bar__inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 0;
        padding: 0 24px;
    }

    .stage-bar__logo-box {
        grid-column: 1 / 2;
        grid-row: 1;
        padding: 18px 0;
        margin-right: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .stage-bar__info {
        grid-column: 2 / 3;
        grid-row: 1;
        padding: 18px 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        margin: 0;
        width: auto;
    }

    /* Единая полоса между рядами */
    .stage-bar__inner {
        position: relative;
    }

    .stage-bar__inner::before {
        content: '';
        position: absolute;
        top: 0;
        left: 24px;
        right: 24px;
        height: 1px;
        /* Если нужна линия сверху, но нам нужна между 1 и 2 рядом */
    }

    /* Используем псевдоэлемент как разделитель */
    .stage-bar__inner::after {
        content: '';
        position: absolute;
        top: 50%;
        /* Примерно посередине между рядами */
        left: 24px;
        right: 24px;
        height: 1px;
        background: #1A1A1A26;
        transform: translateY(-50%);
        z-index: 1;
    }

    /* Чтобы линия была точно между блоками, мы можем привязать её к сетке */
    .stage-bar__inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        width: 100%;
        gap: 0;
        padding: 0 24px;
        position: relative;
    }

    /* Убираем старую реализацию через border */
    .stage-bar__logo-box,
    .stage-bar__info {
        border-bottom: none !important;
    }

    .stage-bar__weather,
    .stage-bar__countdown {
        border-top: none !important;
    }

    .stage-bar__weather {
        grid-column: 1 / 2;
        grid-row: 2;
        padding: 10px 0;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .stage-bar__countdown {
        grid-column: 2 / 3;
        grid-row: 2;
        padding: 10px 0;
        border-top: none;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 6px;
        /* Более плотный таймер */
    }

    .stage-bar__cd-unit {
        min-width: 25px;
    }

    .stage-bar__cd-num {
        font-size: 1.85rem;
        font-weight: 600;
    }

    .stage-bar__cd-sep {
        font-size: 1.55rem;
        color: #718096;
        margin-bottom: 15px;
        font-weight: 600;
    }

    .stage-bar__cd-label {
        font-size: 0.8rem;
        color: #4A5568;
        font-weight: 600;
        margin-top: 1px;
    }

    .stage-bar__weather-val {
        font-size: 1.85rem;
        font-weight: 600;
    }

    .stage-bar__weather-icon {
        font-size: 3.2rem;
    }

    .stage-bar__spacer,
    .stage-bar__divider {
        display: none;
    }

    .stage-bar__event-date {
        font-size: 0.8rem;
        color: #555;
    }

    .stage-bar__name {
        font-size: 1.15rem;
        margin-top: 4px;
        line-height: 1.2;
    }
}

@media screen and (max-width: 480px) {
    .stage-bar__inner {
        padding: 0 16px;
    }

    .stage-bar__inner::after {
        left: 16px;
        right: 16px;
    }

    .stage-bar__logo-box img {
        height: 38px;
    }

    .stage-bar__name {
        font-size: 1.2rem;
        font-weight: 900;
    }

    .stage-bar__weather-val {
        font-size: 1.3rem;
    }

    .stage-bar__weather-icon {
        font-size: 2.2rem;
    }

    .stage-bar__cd-num {
        font-size: 1.2rem;
    }

    .stage-bar__cd-sep {
        font-size: 0.95rem;
        margin-bottom: 16px;
    }

    .stage-bar__event-date {
        font-size: 0.75rem;
    }
}


/* ═══ PAGE CONTENT STARTS AFTER NAVBAR ═══ */
.page-top {
    padding-top: 20px;
}

/* ═══ HERO — убрана, но стили оставлены для совместимости ═══ */
.hero {
    display: none;
}

/* ═══ STATS BAR — маленькая полоска статистики ═══ */
.stats-bar {
    display: flex;
    gap: 32px;
    justify-content: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.stat-card__number {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--accent);
}

.stat-card__label {
    font-size: 0.75rem;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══ SECTIONS ═══ */
.section {
    padding: 20px 0;
}

.section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    gap: 20px;
}

.section__header-left {
    display: flex;
    flex-direction: column;
}

.section__tag {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text2);
    margin-top: 4px;
    order: 2;
    /* Тэг теперь под заголовком */
    text-transform: none;
    /* Убираем апперкейс */
    letter-spacing: normal;
}

.section__title {
    font-size: 37px;
    /* Как в ТЗ юзера на скрине */
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0;
    order: 1;
}

.section__desc {
    color: var(--text2);
    font-size: 1rem;
    /* Сделаем таким же как тэг для единства */
    order: 2;
    /* Теперь под заголовком */
    margin-top: 4px;
}

/* ═══ SHARED PAGE HEADERS ═══ */
.page-header {
    margin-bottom: 40px;
}

.page-title {
    font-size: 52px;
    font-weight: 950;
    letter-spacing: -2px;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.1;
    font-family: var(--font-h);
}

.page-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.page-year-badge {
    background: var(--accent);
    color: #fff;
    padding: 5px 14px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.15);
}

.page-subtitle {
    color: var(--text3);
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .page-header-info {
        gap: 10px;
    }

    .page-subtitle {
        font-size: 13px;
    }
}

.stages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stage-card {
    background: #fff;
    border: 1.5px solid #DBDBDB;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 195px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    /* Чтобы бейдж мог перекрывать границу */
    text-decoration: none !important;
    color: inherit !important;
}

.stage-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
    border-color: #0041FF;
    transform: translateY(-2px);
}

/* Синяя обводка только при наведении — перекрыто выше в .stage-card:hover */

.stage-card__number {
    position: absolute;
    top: 8px;
    right: 16px;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 3.5rem;
    line-height: 1;
    color: #DBDBDB;
    z-index: 1;
    transition: color 0.2s;
}

.stage-card:hover .stage-card__number,
.stage-card:active .stage-card__number {
    color: #0041FF;
}

.stage-card__top {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 20px;
    z-index: 2;
    padding-right: 70px;
}

.stage-card__series {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
}

.stage-card__logo {
    height: 18px;
    width: auto;
    object-fit: contain;
}

.stage-card__date-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #555555;
    /* Текст даты по просьбе юзера */
}

.stage-card__date-row svg {
    width: 14px;
    height: 14px;
    color: #a0aec0;
}

.stage-card__name {
    font-family: var(--font-h);
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 8px;
    line-height: 1.3;
    z-index: 2;
}

.stage-card__stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    color: #718096;
    z-index: 2;
}

.stage-card__stats b {
    color: #000;
}

.stage-card__stats .dot {
    opacity: 0.3;
}

.stage-card__status {
    position: absolute;
    bottom: -1.5px;
    /* Перекрываем рамку снизу */
    right: -1.5px;
    /* Перекрываем рамку справа */
    padding: 5px 12px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    border-radius: 12px 0 10px 0;
    /* Сильнее скругляем верхний левый угол */
    z-index: 3;
    box-shadow: 0 0 0 1px white inset;
    /* Тонкая внутренняя линия для чистоты */
}

.stage-card__status--closed {
    background: #E30613;
}

.stage-card__status--open {
    background: #00AA44;
}

.stage-card__status--training {
    background: #163d7a;
}

.stage-card--training {
    background: linear-gradient(180deg, #f7faff 0%, #edf3ff 100%);
    border-color: #bfd0f2;
}

.stage-card--training:hover {
    border-color: #163d7a;
}

.stage-card--training .stage-card__number,
.stage-card--training .stage-card__series svg,
.stage-card--training .stage-card__date-row svg {
    color: #163d7a;
}

/* Синие карточки (скоро) */
.stage-card--future {
    background: #0041FF;
    border-color: #0041FF;
    color: #fff !important;
}

.stage-card--future::before {
    content: "S.Drive";
    position: absolute;
    bottom: -15px;
    left: 20px;
    font-size: 7rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.08);
    font-family: var(--font-h);
    pointer-events: none;
    line-height: 1;
}

.stage-card--future:hover {
    border-color: #fff;
}

.stage-card--future:hover .stage-card__number,
.stage-card--future:active .stage-card__number {
    color: #fff;
}

.stage-card--future .stage-card__number {
    color: rgba(255, 255, 255, 0.15);
}

.stage-card--future .stage-card__series,
.stage-card--future .stage-card__date-row,
.stage-card--future .stage-card__name,
.stage-card--future .stage-card__stats {
    color: #fff;
}

.stage-card--future .stage-card__name {
    font-size: 1.1rem;
    margin-top: 0;
}

.stage-card--future .stage-card__date-row {
    font-size: 0.82rem;
    font-weight: 400;
}

.stage-card__status--out {
    background: #fff;
    color: #1a202c;
    font-weight: 700;
}



.stage-card__info span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ═══ ЛИДЕРЫ — ДВЕ ТАБЛИЦЫ РЯДОМ ═══ */
.leaders-section {
    padding: 20px 0;
}

.leaders-section h2 {
    font-family: var(--font-h);
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 24px;
}

.leaders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.training-detail-page {
    padding: 48px 0 80px;
}

.training-hero {
    background: linear-gradient(135deg, #0f2f66 0%, #1a4b99 55%, #2d67c3 100%);
    color: white;
    border-radius: 24px;
    padding: 38px;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
}

.training-hero::after {
    content: "TRAINING";
    position: absolute;
    right: -10px;
    bottom: -26px;
    font-family: var(--font-h);
    font-size: 7rem;
    line-height: 1;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.08);
}

.training-hero__pre {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
}

.training-hero__title {
    font-family: var(--font-h);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
    margin-bottom: 12px;
}

.training-hero__lead {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.84);
    margin-bottom: 24px;
}

.training-hero__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    position: relative;
    z-index: 1;
}

.training-meta-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 16px 18px;
    backdrop-filter: blur(10px);
}

.training-meta-card .label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 6px;
}

.training-meta-card .value {
    font-family: var(--font-h);
    font-size: 1.15rem;
    font-weight: 700;
}

.training-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 18px;
}

.training-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    background: #163d7a;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 16px 30px rgba(22, 61, 122, 0.18);
}

.training-slot-site-card {
    background: #fff;
    border: 1px solid #d6e1f3;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 47, 102, 0.05);
}

.training-slot-site-card__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.training-slot-site-card__date {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 4px;
}

.training-slot-site-card__time {
    font-family: var(--font-h);
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
}

.training-slot-site-card__badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.training-slot-site-card__badge.is-open {
    background: #dbeafe;
    color: #163d7a;
}

.training-slot-site-card__badge.is-full {
    background: #fee2e2;
    color: #b91c1c;
}

.training-slot-site-card__statline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #475569;
    font-size: 0.92rem;
    margin-bottom: 12px;
}

.training-slot-progress {
    height: 10px;
    background: #e5edf8;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
}

.training-slot-progress__bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #163d7a 0%, #3f7ae0 100%);
}

.training-slot-site-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: #475569;
    font-size: 0.92rem;
}

.training-slot-site-card__footer a {
    font-weight: 700;
    color: #163d7a;
}

@media (max-width: 900px) {
    .training-hero__meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .training-detail-page {
        padding: 28px 0 60px;
    }

    .training-hero {
        padding: 24px;
        border-radius: 18px;
    }

    .training-slot-site-card__top,
    .training-slot-site-card__footer,
    .training-slot-site-card__statline {
        flex-direction: column;
        align-items: flex-start;
    }
}

.leaders-table-block h3 {
    font-family: var(--font-h);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.leaders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.leaders-table th {
    text-align: left;
    font-weight: 600;
    color: var(--text2);
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 6px 8px;
    border-bottom: 2px solid var(--border);
}

.leaders-table th:last-child,
.leaders-table td:last-child {
    text-align: right;
}

.leaders-table td {
    padding: 8px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.leaders-table tr:last-child td {
    border-bottom: none;
}

.leaders-table .pos {
    font-family: var(--font-h);
    font-weight: 800;
    color: var(--accent);
    width: 24px;
}

.leaders-table .team-name {
    font-weight: 600;
}

.leaders-table .points {
    font-family: var(--font-h);
    font-weight: 700;
}

.leaders-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}

.leaders-link:hover {
    text-decoration: underline;
}

/* ═══ TOP PILOTS — совместимость со старой разметкой ═══ */
.leaderboard-mini {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.leaderboard-mini__row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.leaderboard-mini__row:last-child {
    border-bottom: none;
}

.leaderboard-mini__row:hover {
    background: var(--bg-alt);
}

.leaderboard-mini__pos {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text3);
}

.leaderboard-mini__pos--1 {
    color: var(--gold);
}

.leaderboard-mini__pos--2 {
    color: var(--silver);
}

.leaderboard-mini__pos--3 {
    color: var(--bronze);
}

.leaderboard-mini__pilot {
    display: flex;
    flex-direction: column;
}

.leaderboard-mini__name {
    font-weight: 600;
    font-size: 0.88rem;
}

.leaderboard-mini__team {
    font-size: 0.75rem;
    color: var(--text2);
}

.leaderboard-mini__points {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1rem;
    color: var(--accent);
}

.leaderboard-mini__label {
    font-size: 0.6rem;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══ ШАГИ — КАК УЧАСТВОВАТЬ ═══ */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step-card {
    text-align: left;
    padding: 16px;
    background: #fff;
    border: 1px solid #DBDBDB;
    border-radius: 4px;
    /* Острые углы */
    position: relative;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.step-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-color: var(--accent);
}

.step-card__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0041FF;
    color: #fff;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 0.9rem;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    margin-bottom: 24px;
}

.step-card__title {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1.25rem;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.2;
}

.step-card__text {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
}

.btn--primary:hover {
    background: var(--accent-dark);
    color: #fff;
}

.btn--outline {
    background: #fff;
    color: #1A1A1A;
    border: 1px solid #1A1A1A;
}

.btn--outline:hover {
    background: #1A1A1A;
    color: #fff;
}

.btn--sm {
    padding: 7px 16px;
    font-size: 0.8rem;
}

.btn--lg {
    padding: 12px 28px;
    font-size: 0.9rem;
}

/* ═══ TOURNAMENT TABLE (STANDINGS) ═══ */
.standings-page {
    padding-top: 56px;
    min-height: 100vh;
    background: #fff;
}

.standings-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 0.82rem;
    color: var(--text2);
    font-weight: 500;
}

.filter-select {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 7px 12px;
    border-radius: 6px;
    font-family: var(--font);
    font-size: 0.82rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
}

.table-wrapper::-webkit-scrollbar {
    height: 3px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 0.84rem;
}

.standings-table thead th {
    background: var(--accent);
    color: #fff;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
}

.standings-table thead th:first-child,
.standings-table thead th:nth-child(2),
.standings-table thead th:nth-child(3) {
    text-align: left;
}

.standings-table thead th a {
    color: #fff !important;
}

.standings-table th.sticky,
.standings-table td.sticky {
    position: sticky;
    left: 0;
    z-index: 10;
}

.standings-table th.sticky-2,
.standings-table td.sticky-2 {
    position: sticky;
    left: 50px;
    z-index: 10;
}

.standings-table th.sticky,
.standings-table th.sticky-2 {
    background: var(--accent-dark);
}

.standings-table td.sticky,
.standings-table td.sticky-2 {
    background: #fff;
}

.standings-table tbody tr:nth-child(even) td.sticky,
.standings-table tbody tr:nth-child(even) td.sticky-2 {
    background: var(--bg-alt);
}

.standings-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.standings-table tbody tr:nth-child(even) {
    background: var(--bg-alt);
}

.standings-table tbody tr:hover {
    background: #eef4fc;
}

.standings-table tbody tr:hover td.sticky,
.standings-table tbody tr:hover td.sticky-2 {
    background: #eef4fc;
}

.standings-table tbody td {
    padding: 10px 12px;
    text-align: center;
}

.standings-table tbody td:first-child {
    text-align: center;
}

.standings-table tbody td:nth-child(2),
.standings-table tbody td:nth-child(3) {
    text-align: left;
}

.pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 0.78rem;
}

.pos-badge--1 {
    background: var(--gold);
    color: #fff;
}

.pos-badge--2 {
    background: var(--silver);
    color: #fff;
}

.pos-badge--3 {
    background: var(--bronze);
    color: #fff;
}

.pos-badge--default {
    background: var(--bg-alt);
    color: var(--text2);
}

.pilot-cell {
    display: flex;
    flex-direction: column;
}

.pilot-cell__name {
    font-weight: 600;
}

.pilot-cell__nick {
    font-size: 0.75rem;
    color: var(--text3);
}

.team-cell {
    color: var(--text2);
    font-size: 0.82rem;
}

.points-cell {
    font-weight: 600;
    font-size: 0.82rem;
}

.points-cell--has {
    color: var(--text);
}

.points-cell--zero {
    color: var(--text3);
}

.total-cell {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--accent);
}

/* ═══ STAGE DETAIL ═══ */
.stage-detail-page {
    padding-top: 72px;
    min-height: 100vh;
}

.stage-hero {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.stage-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
}

.stage-hero__title {
    font-family: var(--font-h);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 800;
    margin-bottom: 14px;
}

.stage-hero__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.stage-hero__item {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text2);
    font-size: 0.85rem;
}

.stage-hero__item svg {
    width: 16px;
    height: 16px;
    stroke: var(--text3);
    flex-shrink: 0;
}

/* Podium */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
    padding: 24px 12px 0;
}

.podium__place {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    max-width: 160px;
}

.podium__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 8px;
}

.podium__place--1 .podium__avatar {
    border-color: var(--gold);
    color: var(--gold);
    width: 56px;
    height: 56px;
}

.podium__place--2 .podium__avatar {
    border-color: var(--silver);
    color: var(--silver);
}

.podium__place--3 .podium__avatar {
    border-color: var(--bronze);
    color: var(--bronze);
}

.podium__name {
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 2px;
}

.podium__team {
    font-size: 0.72rem;
    color: var(--text2);
    margin-bottom: 8px;
}

.podium__bar {
    width: 100%;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 1.2rem;
}

.podium__place--1 .podium__bar {
    height: 120px;
    background: rgba(230, 168, 23, 0.06);
    border: 1px solid rgba(230, 168, 23, 0.15);
    color: var(--gold);
}

.podium__place--2 .podium__bar {
    height: 85px;
    background: rgba(138, 138, 138, 0.06);
    border: 1px solid rgba(138, 138, 138, 0.12);
    color: var(--silver);
}

.podium__place--3 .podium__bar {
    height: 60px;
    background: rgba(184, 115, 51, 0.06);
    border: 1px solid rgba(184, 115, 51, 0.12);
    color: var(--bronze);
}

/* ═══ RESULTS TABLE ═══ */
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.results-table thead th {
    background: var(--accent);
    color: #fff;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    text-align: left;
}

.results-table thead th:first-child {
    text-align: center;
    width: 56px;
}

.results-table thead th:last-child,
.results-table thead th:nth-last-child(2) {
    text-align: center;
}

.results-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.results-table tbody tr:nth-child(even) {
    background: var(--bg-alt);
}

.results-table tbody tr:hover {
    background: #eef4fc;
}

.results-table tbody td {
    padding: 10px 16px;
}

.results-table tbody td:first-child {
    text-align: center;
}

.results-table tbody td:last-child,
.results-table tbody td:nth-last-child(2) {
    text-align: center;
}

/* ═══ REGULATIONS ═══ */
.regulations-page {
    padding-top: 72px;
    min-height: 100vh;
}

.regulations-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 28px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.regulations-card__icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.regulations-card__title {
    font-family: var(--font-h);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.regulations-card__text {
    color: var(--text2);
    margin-bottom: 24px;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ═══ STAGE NAV ═══ */
.stage-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.stage-nav__item {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text2);
    background: var(--bg-alt);
    border: 1px solid transparent;
    transition: all 0.15s;
}

.stage-nav__item:hover {
    border-color: var(--border);
    color: var(--text);
}

.stage-nav__item.active {
    background: var(--accent);
    color: #fff;
}

/* ═══ FOOTER ═══ */
.footer {
    background: #0B1930;
    color: #fff;
    padding: 30px 0 15px;
    margin-top: 60px;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer__brand {
    background: #0041FF;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.footer__brand img {
    height: 24px;
    width: auto;
}

.footer__links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.footer__links a {
    color: #cbd5e0;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.footer__links a:hover {
    color: #fff;
}

.footer__copy {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin-top: 0;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ═══ TELEGRAM FAB ═══ */
.tg-fab {
    position: fixed;
    bottom: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    background: #0088cc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 136, 204, 0.25);
    z-index: 999;
    transition: all 0.15s;
}

.tg-fab:hover {
    transform: scale(1.06);
}

.tg-fab svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══ 404 ═══ */
.error-page {
    padding-top: 100px;
    text-align: center;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-page__code {
    font-family: var(--font-h);
    font-size: 5rem;
    font-weight: 900;
    color: var(--accent);
}

.error-page__text {
    color: var(--text2);
    font-size: 1rem;
    margin: 10px 0 24px;
}

/* ═══ RESPONSIVE — TABLET ═══ */
@media (max-width:1024px) {
    .stages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .leaders-grid {
        grid-template-columns: 1fr;
    }

    .section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .podium__place--1 .podium__bar {
        height: 90px;
    }

    .podium__place--2 .podium__bar {
        height: 65px;
    }

    .podium__place--3 .podium__bar {
        height: 48px;
    }
}

/* ═══ RESPONSIVE — MOBILE ═══ */
@media (max-width:768px) {
    .container {
        padding: 0 16px;
    }

    .section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .section__header>.btn {
        width: 100%;
        text-align: center;
        display: block;
    }

    .leaders-tabs {
        gap: 4px;
        margin-bottom: 20px;
        justify-content: center;
    }

    .tab-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        letter-spacing: 0;
    }

    .leaders-card {
        padding: 16px;
    }

    .leaders-table th,
    .leaders-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    .leaders-table .pos {
        width: 30px;
        font-size: 0.9rem;
    }

    .leaders-table .pts {
        font-size: 0.95rem;
    }

    .navbar {
        padding: 0 16px;
    }

    .navbar__inner {
        height: 50px;
    }

    .navbar__burger {
        display: flex;
    }

    .navbar__stage {
        display: none;
    }

    .stage-bar {
        margin-top: 56px;
        padding: 8px 16px;
    }

    .stage-bar__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .navbar__links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 280px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 64px 16px 16px;
        gap: 2px;
        border-left: 1px solid var(--border);
        box-shadow: -2px 0 12px rgba(0, 0, 0, 0.04);
        transition: right 0.3s;
        z-index: 1000;
        overflow-y: auto;
    }

    .navbar__links.open {
        right: 0;
    }

    .navbar__links a {
        width: 100%;
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .navbar__cta {
        margin-top: 8px;
        text-align: center;
        justify-content: center;
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.15);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }

    .mobile-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .page-top {
        padding-top: 30px;
    }

    .stats-bar {
        gap: 16px;
        padding: 14px 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-card__number {
        font-size: 1.1rem;
    }

    .stages-grid {
        grid-template-columns: 1fr;
    }

    .stage-card {
        min-height: auto;
        padding: 16px;
    }

    .stage-card__number {
        font-size: 2rem;
        top: 10px;
        right: 12px;
    }

    .section {
        padding: 14px 0;
    }

    .standings-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .standings-table {
        font-size: 0.76rem;
    }

    .standings-table thead th,
    .standings-table tbody td {
        padding: 7px 8px;
    }

    .pos-badge {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .stage-hero {
        padding: 18px 12px;
    }

    .stage-hero__info {
        grid-template-columns: 1fr;
    }

    .podium {
        gap: 5px;
        padding: 10px 4px 0;
    }

    .podium__avatar {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }

    .podium__place--1 .podium__avatar {
        width: 48px;
        height: 48px;
    }

    .podium__name {
        font-size: 0.75rem;
    }

    .podium__team {
        font-size: 0.65rem;
    }

    .podium__bar {
        font-size: 0.9rem;
    }

    .podium__place--1 .podium__bar {
        height: 75px;
    }

    .podium__place--2 .podium__bar {
        height: 55px;
    }

    .podium__place--3 .podium__bar {
        height: 40px;
    }

    .results-table {
        font-size: 0.76rem;
    }

    .results-table thead th,
    .results-table tbody td {
        padding: 8px 10px;
    }

    .regulations-card {
        padding: 14px 16px;
    }

    .regulations-card__title {
        font-size: 1.2rem;
    }

    .stage-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .stage-nav__item {
        flex-shrink: 0;
    }

    .footer__inner {
        flex-direction: column;
        text-align: center;
    }

    .footer__links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .leaderboard-mini__row {
        grid-template-columns: 30px 1fr auto;
        padding: 10px 12px;
    }

    .tg-fab {
        width: 40px;
        height: 40px;
        bottom: 12px;
        right: 12px;
    }

    .tg-fab svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width:480px) {
    html {
        font-size: 14px;
    }

    .navbar__logo span {
        font-size: 1.1rem;
    }

    .stages-grid {
        grid-template-columns: 1fr;
    }

    .podium__team {
        display: none;
    }

    .pilot-cell__nick {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   UPCOMING STAGE BAR — горизонтальная плашка ближайшего этапа
   ═══════════════════════════════════════════════════════════ */
.upcoming-bar {
    background: var(--accent);
    color: #fff;
    padding: 12px 0;
}

.upcoming-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.upcoming-bar__info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.upcoming-bar__label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    opacity: 0.7;
}

.upcoming-bar__stage {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
}

.upcoming-bar__date {
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
}

.upcoming-bar__name {
    font-weight: 700;
}

.upcoming-bar__place {
    opacity: 0.7;
    font-size: 0.82rem;
}

/* Countdown */
.upcoming-bar__countdown {
    display: flex;
    align-items: center;
    gap: 4px;
}

.countdown__item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown__num {
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 1.5rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
    border-radius: 6px;
    min-width: 44px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.countdown__label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    margin-top: 3px;
}

.countdown__sep {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 1.2rem;
    opacity: 0.4;
    margin: 0 1px;
    margin-bottom: 14px;
}

/* Weather */
.upcoming-bar__weather {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    border-radius: 8px;
}

.weather__temp {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1.4rem;
}

.weather__desc {
    font-size: 0.78rem;
    font-weight: 500;
}

.weather__extra {
    font-size: 0.68rem;
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════
   GALLERY — галерея этапов
   ═══════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════
   GALLERY — галерея этапов (Redesign)
   ═══════════════════════════════════════════════════════════ */
.gallery-wrapper {
    position: relative;
    width: 100%;
}

.gallery-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Скрываем стандартный скроллбар для чистоты (опционально) */
.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background: #001A34;
    /* Почти черный/темно-синий из макета */
    transform: scale(1.1);
}

.gallery-grid::-webkit-scrollbar {
    display: none;
    /* Скрываем стандартный скроллбар, так как теперь есть точки */
}

.gallery-grid {
    scrollbar-width: none;
    /* Firefox */
}

.gallery-card {
    flex: 0 0 calc(25% - 10.66px);
    /* Возвращаемся к расчету 1/3 доли от 32px гэпа */
    height: 260px;
    border-radius: 4px;
    /* Острые углы */
    position: relative;
    overflow: hidden;
    text-decoration: none;
    background-size: cover;
    background-position: center;
    scroll-snap-align: start;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:nth-child(3n+1) {
    flex: 0 0 calc(50% - 10.66px);
    /* Сохраняем ту же долю вычета, чтобы сумма была 100% */
}

.gallery-card:hover {
    transform: scale(1.02);
}

.gallery-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 24px;
    color: #fff;
    transition: background 0.3s;
}

.gallery-card:hover .gallery-card__overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
}

.gallery-card__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gallery-card__stage {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1.2;
}

.gallery-card__track {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.gallery-card__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 10px 18px;
    border-radius: 4px;
    /* Острые углы для кнопки */
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.gallery-card__btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5px;
}

.gallery-card:hover .gallery-card__btn {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ═══ RESPONSIVE — UPCOMING BAR ═══ */
@media (max-width: 768px) {
    .upcoming-bar__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .upcoming-bar__info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .upcoming-bar__stage {
        flex-wrap: wrap;
        gap: 4px;
        font-size: 0.82rem;
    }

    .countdown__num {
        font-size: 1.2rem;
        padding: 4px 8px;
        min-width: 36px;
    }

    .upcoming-bar__weather {
        padding: 6px 10px;
    }

    .weather__temp {
        font-size: 1.1rem;
    }

    .gallery-card {
        flex: 0 0 280px;
        height: 200px;
    }

    .gallery-card:first-child {
        flex: 0 0 450px;
    }
}

@media (max-width: 480px) {
    .gallery-card {
        flex: 0 0 240px;
        height: 180px;
    }

    .gallery-card:first-child {
        flex: 0 0 240px;
    }
}

/* ═══ PARTICIPANTS PAGE ═══ */
.participants-page {
    padding-top: 60px;
    padding-bottom: 40px;
}

.participants-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.participants-stats__item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.participants-stats__num {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 2rem;
    color: var(--accent);
    line-height: 1;
}

.participants-stats__label {
    font-size: 0.8rem;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.participants-stats__divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* Teams Grid */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

.team-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.team-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(52, 144, 240, 0.1);
}

.team-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef4fb 100%);
    border-bottom: 1px solid var(--border);
}

.team-card__icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.team-card__title-block {
    min-width: 0;
}

.team-card__name {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
}

.team-card__meta {
    font-size: 0.78rem;
    color: var(--text2);
}

.team-card__members {
    padding: 8px 0;
}

/* Pilot Row */
.pilot-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    transition: background 0.15s;
}

.pilot-row:hover {
    background: #f8fafc;
}

.pilot-row+.pilot-row {
    border-top: 1px solid #f2f2f2;
}

.pilot-row__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #6ab0f7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.pilot-row__info {
    flex: 1;
    min-width: 0;
}

.pilot-row__name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.2;
}

.pilot-row__nick {
    font-size: 0.78rem;
    color: var(--text2);
}

.pilot-row__role {
    color: var(--accent);
    font-weight: 500;
}

.pilot-row__stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.pilot-row__points {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent);
    line-height: 1.2;
}

.pilot-row__races {
    font-size: 0.72rem;
    color: var(--text3);
}

/* Responsive */
@media (max-width: 768px) {
    .teams-grid {
        grid-template-columns: 1fr;
    }

    .participants-stats {
        gap: 20px;
        padding: 16px;
    }

    .participants-stats__num {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .pilot-row {
        padding: 8px 14px;
    }

    .pilot-row__avatar {
        width: 32px;
        height: 32px;
        font-size: 0.65rem;
    }
}

/* ═══ КАЛЬКУЛЯТОР КЛАССОВ ═══ */
.calc-section {
    padding: 40px 0;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 40px;
    margin-top: 40px;
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pilot-block {
    background: #fff;
    border: 1px solid #DBDBDB;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.pilot-block__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pilot-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4a5568;
}

.coefficient-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #718096;
}

.coeff-val {
    color: #0041FF;
    margin-left: 4px;
}

.class-buttons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.class-btn {
    height: 44px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-weight: 900;
    font-family: var(--font-h);
    font-style: italic;
    font-size: 1.3rem;
    color: #2D3748;
    cursor: pointer;
    transition: all 0.2s;
}

.class-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.class-btn.active {
    box-shadow: none;
    color: #fff;
}

.class-btn--s.active { background: #B366FF; border-color: #B366FF; }
.class-btn--a.active { background: #EF4444; border-color: #EF4444; }
.class-btn--b.active { background: #F97316; border-color: #F97316; }
.class-btn--c.active { background: #FFC107; border-color: #FFC107; color: #000; }
.class-btn--d.active { background: #22C55E; border-color: #22C55E; }
.class-btn--n.active { background: #94A3B8; border-color: #94A3B8; }

/* Правая часть — результат */
.calc-result {
    background: #f4f7f9;
    background: linear-gradient(135deg, #f4f7f9 0%, #edf2f7 100%);
    border: 1.5px solid #0041FF;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.calc-result h3 {
    font-family: var(--font-h);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: #1a202c;
}

.score-value {
    font-family: var(--font-h);
    font-size: 4.5rem;
    font-weight: 950;
    line-height: 1;
    margin-bottom: 10px;
    color: #1a202c;
    transition: color 0.4s ease;
}

.score-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.summary-chip {
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #4a5568;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.chip-letter {
    font-family: var(--font-h);
    font-weight: 950;
    font-style: italic;
    font-size: 0.95rem;
}

.letter--s { color: #B366FF; }
.letter--a { color: #EF4444; }
.letter--b { color: #F97316; }
.letter--c { color: #FFC107; }
.letter--d { color: #22C55E; }
.letter--n { color: #94A3B8; }

.league-info {
    font-size: 0.9rem;
    font-weight: 600;
    color: #718096;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.league-name {
    color: #0f2346;
    font-weight: 900;
    font-size: 1.8rem;
    margin-left: 8px;
    vertical-align: middle;
    transition: color 0.4s ease;
}

.league-name.pro {
    color: #0041ff;
}

.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    position: relative;
    margin-bottom: 15px;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #0f2346;
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.17, 0.67, 0.83, 0.67), background-color 0.4s ease;
}

.progress-labels {
    position: relative;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: #718096;
}

.progress-labels span:nth-child(2) {
    position: absolute;
    left: 45.8%;
    /* (55 / 120) * 100 % */
    transform: translateX(-50%);
    white-space: nowrap;
}

.reset-btn {
    margin-top: auto;
    background: transparent;
    border: 1px solid #1a202c;
    border-radius: 4px;
    padding: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    background: #1a202c;
    color: #fff;
}

@media (max-width: 992px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }

    .calc-result {
        padding: 15px;
    }
}

/* ═══ ЛИДЕРЫ ЧЕМПИОНАТА (NEW) ═══ */
.leaders-section {
    padding: 30px 0;
}

.leaders-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1.5px solid #edf2f7;
    padding-bottom: 1px;
}

.tab-btn {
    padding: 10px 24px;
    background: transparent;
    border: none;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 0.82rem;
    color: #4a5568;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn.active {
    color: #fff;
    background: #0041FF;
    border-radius: 4px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.leaders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.leaders-card {
    background: #fff;
    border: 1.5px solid #DBDBDB;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-header h3 {
    font-family: var(--font-h);
    font-size: 1.375rem;
    font-weight: 800;
    color: #1a202c;
}

.card-filters {
    display: flex;
    gap: 6px;
}

.filter-pill {
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
}

.filter-pill.active {
    background: #fff;
    border-color: #0041FF;
    color: #0041FF;
}

.leaders-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.leaders-table thead {
    background: #f8fafc;
}

.leaders-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #718096;
}

.leaders-table th:last-child {
    text-align: right;
}

.leaders-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    border-bottom: 1.5px solid #f8fafc;
}

.leaders-table tr:last-child td {
    border-bottom: none;
}

.leaders-table .pos {
    width: 40px;
    font-family: var(--font-h);
    font-weight: 950;
    color: #0041FF;
    font-size: 1.05rem;
}

.leaders-table .name {
    font-weight: 600;
    color: #1a202c;
}

.leaders-table .lap {
    color: #4a5568;
    font-family: var(--font-h);
    font-weight: 500;
}

.leaders-table .pts {
    text-align: right;
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 1.1rem;
    color: #1a202c;
}

.card-btn {
    margin-top: auto;
    width: fit-content;
    padding: 10px 20px;
    background: #fff;
    border: 1.5px solid #1A1A1A;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #1A1A1A;
}

.card-btn:hover {
    background: #1A1A1A;
    color: #fff;
}

@media (max-width: 992px) {
    .leaders-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .card-btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        box-sizing: border-box;
        display: block;
    }
}

@media screen and (max-width: 992px) {
    .navbar__links {
        display: none !important;
    }

    .navbar__burger {
        display: flex !important;
    }
}

/* Mobile Menu Redesign */
.mobile-overlay {
    position: fixed;
    top: 50px;
    left: 0;
    width: 100%;
    height: calc(100% - 50px);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    visibility: hidden;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 50px;
    left: 0;
    width: 100%;
    height: auto;
    background: #fff;
    z-index: 2001;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    transform: translateY(-110%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #eeeeee;
}

.mobile-menu__logo img {
    height: 32px;
    background: #0041FF;
    padding: 6px 12px;
    border-radius: 4px;
}

.mobile-menu__close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #1a1a1a;
}

.mobile-menu__close svg {
    width: 24px;
    height: 24px;
}

.mobile-menu__content {
    padding: 32px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mobile-menu__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.mobile-menu__column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu__column a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.mobile-menu__column a.active {
    color: #0041FF;
}

.mobile-menu__btn {
    margin-top: auto;
    background: #0041FF;
    color: #fff;
    text-align: center;
    padding: 18px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}


/* ─── Results & Standings shared styles (FIGMA MATCH) ─── */
.premium-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.premium-table thead tr {
    background: #F8F9FB;
}

.premium-table th {
    padding: 10px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #718096;
    letter-spacing: 0.5px;
    border: none;
}

.premium-table td {
    padding: 12px 16px;
    border: none;
    border-bottom: 1.5px solid #f8fafc;
    font-size: 0.95rem;
    color: #1a202c;
    vertical-align: middle;
    background: #fff;
}

/* Эффект при наведении как на главной */
.premium-table tr:hover td {
    background-color: #f7fafc !important;
}

/* Номера позиций (01, 02, 03) - СИНИЕ И ЖИРНЫЕ */
.premium-table .col-pos,
.premium-table .pos-cell {
    color: #0041FF;
    font-weight: 900;
    font-size: 1.1rem;
    width: 40px;
    left: 0;
}

.premium-table .col-team,
.premium-table .col-pilot {
    min-width: 140px;
    max-width: 220px;
}

.team-cell-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-cell-info .hint {
    font-size: 0.65rem;
    color: #a0aec0;
    font-weight: 600;
}

.premium-table .team-name,
.premium-table .pilot-name {
    font-weight: 700;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ФИНАЛЬНАЯ КОЛОНКА (Очки) - ЧЕРНАЯ И ЖИРНАЯ */
.premium-table .col-total,
.premium-table .col-pts,
.premium-table .total-pts-badge,
.premium-table .pts-badge {
    font-weight: 900;
    font-size: 1.2rem;
    color: #000;
    background: transparent !important;
    /* Убираем баджи, делаем просто текст */
    padding: 0 24px;
    text-align: right !important;
    min-width: 70px;
}

.col-stage {
    min-width: 80px;
    text-align: center !important;
}

.mini-pts {
    font-weight: 700;

    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.empty-pts {
    color: #cbd5e0;
    font-size: 0.85rem;
}

.col-team-name {
    min-width: 120px;
}

/* Обертка всей таблицы */
.premium-table-wrapper {
    background: #fff;
    border: 1.5px solid #DBDBDB;
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    box-shadow: none;
}

.sticky-col {
    position: sticky;
    z-index: 10;
    background: #fff !important;
    left: 0;
    /* Fallback for the first column */
}

.premium-table tr:hover .sticky-col {
    background: #f7fafc !important;
}

.premium-table th.sticky-col {
    background: #F8F9FB !important;
}

/* ─── Tabs (Match Home Page) ─── */
.premium-tabs-container {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.premium-tabs {
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    display: flex;
    gap: 4px;
}

.premium-tab {
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-family: var(--font-h);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
}

.premium-tab.active {
    background: #0041FF;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 65, 255, 0.25);
}

.premium-tab .count {
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
    color: inherit;
}

.premium-tab.active .count {
    background: rgba(255, 255, 255, 0.2);
}

/* ─── Premium Filter ─── */
.premium-filter {
    margin-bottom: 8px;
}

.premium-filter label {
    font-size: 0.65rem;
    font-weight: 900;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.select-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.select-wrapper select {
    width: 100%;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1.5px solid #DBDBDB;
    font-weight: 700;
    appearance: none;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.select-wrapper select:focus {
    border-color: #0041FF;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 65, 255, 0.1);
}

.select-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #0041FF;
}

/* ─── Standings Table & Scrolling FIX ─── */
.table-wrapper-outer {
    position: relative;
    margin-bottom: 40px;
    overflow-x: visible;
}

.table-scroll-hint {
    display: none;
    /* Скрыто на ПК */
    text-align: right;
    font-size: 0.65rem;
    font-weight: 800;
    color: #0041FF;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-table {
    min-width: 900px;
}

/* ФИКС ПРОКРУТКИ */

/* ─── Team Detail Panel ─── */
.details-cell {
    background: #f8fafc !important;
    padding: 0 !important;
    border-bottom: none !important;
}

.details-row {
    display: none;
}

.details-inner-card {
    background: #fff;
    margin: 0 15px;
    padding: 0 24px;
    border-radius: 12px;
    border: 1.5px solid #edf2f7;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
}

/* Opening animation */
.details-row.active .details-inner-card {
    animation: detailExpand 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Closing animation */
.details-row.closing .details-inner-card {
    animation: detailShrink 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes detailExpand {
    0% {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
        transform: translateY(-10px);
    }

    100% {
        max-height: 1500px;
        opacity: 1;
        margin-top: 15px;
        margin-bottom: 30px;
        padding-top: 24px;
        padding-bottom: 24px;
        transform: translateY(0);
    }
}

@keyframes detailShrink {
    0% {
        max-height: 1500px;
        opacity: 1;
        margin-top: 15px;
        margin-bottom: 30px;
        padding-top: 24px;
        padding-bottom: 24px;
        transform: translateY(0);
    }

    100% {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
        transform: translateY(-10px);
    }
}

.details-row.active .details-cell {
    border-bottom: 1.5px solid #edf2f7 !important;
}

.details-header h3 {
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 1.1rem;
    color: #1a202c;
    margin-bottom: 15px;
}

.details-header span {
    color: #0041FF;
}

.details-table-wrapper {
    overflow-x: auto;
    margin-top: 15px;
}

.details-table {
    min-width: 600px;
    width: 100%;
    border-collapse: collapse;
}

/* ─── Footer/CTA Fix Overlap ─── */
.standings-footer {
    margin-top: 60px;
    padding: 60px 0;
    border-top: 1.5px solid #edf2f7;
    text-align: center;
}

.cta-box p {
    font-size: 1.2rem;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 25px;
    line-height: 1.4;
}

@media (max-width: 1024px) {
    .table-scroll-hint {
        display: block;
    }

    /* Показ только на мобилках */
    .premium-table {
        min-width: auto;
        width: max-content;
        table-layout: auto;
    }

    .premium-table .col-team,
    .premium-table .col-pilot {
        min-width: 100px;
        max-width: 150px;
    }

    .team-cell-info .hint {
        display: block;
        font-size: 0.6rem;
        opacity: 0.8;
    }

    .col-stage {
        min-width: 65px !important;
        padding: 12px 5px !important;
    }

    .premium-table .col-total,
    .premium-table .total-pts-badge {
        min-width: 75px !important;
        padding-right: 10px !important;
    }

    .details-inner-card {
        margin: 10px 5px;
        padding: 16px;
    }

    .details-header h3 {
        font-size: 1rem;
    }
}

/* ═══ STAGE DETAIL PAGE (RECONSTRUCTION) ═══ */
.stage-detail-page {
    padding-top: 56px;
    padding-bottom: 80px;
}

.stage-nav {
    margin-bottom: 30px;
}

.stage-nav__list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.stage-nav__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #DBDBDB;
    padding: 8px 16px;
    border-radius: 8px;
    min-width: 70px;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.stage-nav__btn.active {
    background: #0041FF;
    border-color: #0041FF;
    color: #fff;
}

.stage-nav__btn span {
    font-size: 0.65rem;
    opacity: 0.6;
    text-transform: uppercase;
    font-weight: 700;
}

/* Back to Standings Pill */
.stage-back {
    margin-bottom: 24px;
}

.back-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #DBDBDB;
    padding: 8px 16px;
    border-radius: 100px;
    color: #1a1a1a;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.2s;
}

.back-pill:hover {
    border-color: #0041FF;
    color: #0041FF;
    transform: translateX(-4px);
}

/* ═══ STAGE DETAIL PAGE (RECONSTRUCTION) ═══ */
.stage-header__pre {
    font-size: 0.75rem;
    font-weight: 900;
    color: #718096;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.stage-header__title {
    font-family: var(--font-h);
    font-size: 3rem;
    font-weight: 950;
    color: #1a202c;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.stage-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.stage-stat-box {
    background: #fff;
    border: 1px solid #DBDBDB;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stage-stat-box__icon {
    width: 44px;
    height: 44px;
    background: #F8F9FB;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0041FF;
    flex-shrink: 0;
}

.stage-stat-box__icon svg {
    width: 20px;
    height: 20px;
}

.stage-stat-box__content {
    display: flex;
    flex-direction: column;
}

.stage-stat-box__content .label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stage-stat-box__content .val {
    font-weight: 700;
    color: #1a202c;
    font-size: 1rem;
}

.val-combined {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.map-link {
    font-size: 0.8rem;
    color: #0041FF;
    font-weight: 700;
}

/* Podium v2 */
.podium-v2 {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    margin: 40px 0;
    min-height: 200px;
}

.podium-v2__item {
    background: #fff;
    border: 1.5px solid #DBDBDB;
    padding: 24px 16px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    flex: 1;
    max-width: 200px;
    transition: transform 0.3s;
}

.podium-v2__item:hover {
    transform: translateY(-5px);
}

.podium-v2__item--1 {
    order: 2;
    min-height: 220px;
    border-color: #f7ca18;
    /* Золотой цвет */
    background: linear-gradient(135deg, #fff 0%, #fffdf0 100%);
    box-shadow: 0 10px 40px rgba(247, 202, 24, 0.15);
}

.podium-v2__item--1 .podium-v2__rank {
    color: #f7ca18;
    /* Золотой ранг */
}

.podium-v2__item--2 {
    order: 1;
    min-height: 180px;
    border-color: #BDC3C7;
    /* Серебро */
}

.podium-v2__item--2 .podium-v2__rank {
    color: #BDC3C7;
}

.podium-v2__item--3 {
    order: 3;
    min-height: 160px;
    border-color: #D3540066;
    /* Бронза (полупрозрачная) */
}

.podium-v2__item--3 .podium-v2__rank {
    color: #D35400AA;
}

.podium-v2__rank {
    font-family: var(--font-h);
    font-weight: 950;
    font-size: 2rem;
    color: #DBDBDB;
    line-height: 1;
    margin-bottom: 12px;
}

.podium-v2__name {
    font-weight: 800;
    color: #1a202c;
    font-size: 1rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.podium-v2__score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.podium-v2__score .points {
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 1.5rem;
    color: #000;
}

.podium-v2__score .pts-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #718096;
}

.podium-v2__meta {
    font-size: 0.75rem;
    color: #718096;
    margin-top: 8px;
    font-weight: 600;
}

.empty-results {
    text-align: center;
    padding: 60px 0;
    background: #fff;
    border: 1.5px dashed #DBDBDB;
    border-radius: 12px;
}

.empty-results__icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-results p {
    color: #718096;
    font-weight: 600;
}

.stage-footer {
    margin-top: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    font-weight: 700;
    transition: color 0.2s;
    text-decoration: none;
}

.back-link:hover {
    color: #0041FF;
}

.back-link svg {
    width: 18px;
    height: 18px;
}

/* Responsive Detail */
@media (max-width: 768px) {
    .stage-header__title {
        font-size: 2.2rem;
        margin-top: 10px;
    }

    .podium-v2 {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin: 30px 0;
    }

    .podium-v2__item {
        max-width: 100%;
        display: flex;
        align-items: center;
        padding: 16px 20px;
        text-align: left;
        min-height: auto !important;
        background: #fff;
        border: 1.5px solid #DBDBDB;
    }

    .podium-v2__item--1 {
        order: 1 !important;
        border-color: #f7ca18;
        /* Золото на мобилке */
        background: #fffdf0;
    }

    .podium-v2__item--1 .podium-v2__rank {
        color: #f7ca18;
    }

    .podium-v2__item--2 {
        order: 2 !important;
        border-color: #BDC3C7;
    }

    .podium-v2__item--2 .podium-v2__rank {
        color: #BDC3C7;
    }

    .podium-v2__item--3 {
        order: 3 !important;
        border-color: #D3540044;
    }

    .podium-v2__item--3 .podium-v2__rank {
        color: #D3540088;
    }

    .podium-v2__rank {
        width: 45px;
        margin-bottom: 0;
        margin-right: 15px;
        font-size: 1.8rem;
        flex-shrink: 0;
    }

    .podium-v2__name {
        font-size: 0.95rem;
        margin-bottom: 0;
        flex: 1;
        padding-right: 15px;
    }

    .podium-v2__score {
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
    }

    .podium-v2__score .points {
        font-size: 1.2rem;
    }

    .podium-v2__score .pts-label {
        font-size: 0.6rem;
        margin-top: -4px;
    }

    .podium-v2__meta {
        display: none;
    }

}
