.statistics-page {
    position: relative;
    isolation: isolate;
    flex: 0 0 auto;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(104px, 8vw, 128px) clamp(20px, 4vw, 64px) clamp(72px, 8vw, 112px);
    overflow: visible;
    color: #e2e5fc;
    background-color: #121117;
    background-image: linear-gradient(180deg, #16141d 0%, #121117 100%);
}

.statistics-page::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 0 0 auto;
    height: min(980px, 100svh);
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(13, 12, 18, 0.32) 0%, rgba(18, 17, 23, 0.62) 62%, #121117 100%),
        url("../../../img/bg-about.jpg") center top / cover no-repeat;
}

.statistics-page::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 34% 260px at 50% 118px, rgba(231, 174, 53, 0.13), transparent 100%),
        linear-gradient(90deg, rgba(18, 17, 23, 0.5) 0%, transparent 24%, transparent 76%, rgba(18, 17, 23, 0.5) 100%);
}

.statistics-page .container {
    width: min(1456px, 100%);
    max-width: none;
    margin: 0 auto;
    padding: 0;
}

.statistics-page__heading {
    position: relative;
    width: min(680px, 100%);
    margin: 4px auto 26px;
    text-align: center;
}

.statistics-page__heading h1 {
    margin: 0;
    color: #e2e5fc;
    font-family: Philosopher-Regular, serif;
    font-size: clamp(38px, 4.2vw, 58px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.015em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.statistics-page__ornament {
    display: block;
    width: 159px;
    max-width: 60%;
    height: auto;
    margin: 14px auto 0;
}

.statistics-page .nav-tabs {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    overflow-x: auto;
    border: 0;
    background: transparent;
    scrollbar-width: thin;
    scrollbar-color: rgba(231, 174, 53, 0.8) transparent;
}

.statistics-page .stats-updated {
    margin: 12px 0 0;
    color: rgba(226, 229, 252, 0.58);
    font-family: AvenirNextCyr-Regular, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.statistics-page .nav-item {
    flex: 0 0 auto;
    list-style: none;
}

.statistics-page .nav-link {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 8px;
    border: 0;
    border-radius: 0;
    color: rgba(226, 229, 252, 0.72);
    appearance: none;
    cursor: pointer;
    pointer-events: auto;
    background: transparent;
    font-family: AvenirNextCyr-Medium, sans-serif;
    font-size: 14px;
    line-height: 1.25;
    text-align: center;
    text-transform: none;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.statistics-page .nav-link::after {
    bottom: 2px;
    z-index: 0;
    display: block;
    height: 1px;
    pointer-events: none;
    background: #e7ae35;
}

.statistics-page .nav-link:hover,
.statistics-page .nav-link:focus-visible {
    border-color: transparent;
    color: #fff;
    background: transparent;
}

.statistics-page .nav-link.active {
    border-color: transparent;
    color: #e7ae35;
    background: transparent;
    box-shadow: none;
}

.statistics-page .nav-link.active::after {
    width: 100%;
    left: 0;
    right: auto;
}

.statistics-page .tab-content {
    margin-top: 36px;
}

.statistics-page .tab-pane {
    display: none;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    opacity: 1;
    background: transparent;
    box-shadow: none;
}

.statistics-page .tab-pane.active {
    display: block;
}

.statistics-page .tab-pane > h3 {
    margin: 0 0 26px;
    padding: 0;
    border: 0;
    color: #e2e5fc;
    font-family: Philosopher-Regular, serif;
    font-size: clamp(27px, 2.4vw, 34px);
    font-weight: 400;
    line-height: 1.2;
}

.statistics-page .tab-pane > h3::after,
.statistics-page .description > h3::after {
    content: "";
    display: block;
    width: 72px;
    height: 1px;
    margin-top: 12px;
    background: linear-gradient(90deg, #e7ae35, rgba(231, 174, 53, 0));
}

.statistics-page .stats-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    min-width: 0;
}

.statistics-page #stats > .stats-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
}

.statistics-page .statistics-primary-column,
.statistics-page .table-container,
.statistics-page .right-content {
    min-width: 0;
    width: 100%;
}

.statistics-page .table-container {
    overflow-x: auto;
    border: 1px solid rgba(226, 229, 252, 0.16);
    border-radius: 20px;
    background: transparent;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(231, 174, 53, 0.72) rgba(226, 229, 252, 0.08);
}

.statistics-page .table-container::-webkit-scrollbar,
.statistics-page .nav-tabs::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.statistics-page .table-container::-webkit-scrollbar-track,
.statistics-page .nav-tabs::-webkit-scrollbar-track {
    background: rgba(226, 229, 252, 0.06);
    border-radius: 999px;
}

.statistics-page .table-container::-webkit-scrollbar-thumb,
.statistics-page .nav-tabs::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(231, 174, 53, 0.72);
}

.statistics-page .table-stats {
    width: 100%;
    min-width: 680px;
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: rgba(226, 229, 252, 0.88);
    background: transparent;
    font-family: AvenirNextCyr-Regular, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
}

.statistics-page #pvp-players .table-stats {
    min-width: 1120px;
}

.statistics-page #clans .table-stats {
    min-width: 960px;
}

.statistics-page #ally .table-stats {
    min-width: 760px;
}

.statistics-page .table-stats th,
.statistics-page .table-stats td {
    padding: 15px 16px;
    border: 0;
    border-bottom: 1px solid rgba(226, 229, 252, 0.1);
    vertical-align: middle;
}

.statistics-page .table-stats th {
    color: #f4d58e;
    background: transparent;
    font-family: AvenirNextCyr-Medium, sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.035em;
    white-space: nowrap;
}

.statistics-page .table-stats tbody tr {
    background: transparent;
    transition: background-color 0.18s ease;
}

.statistics-page .table-stats tbody tr:nth-child(even) {
    background: transparent;
}

.statistics-page .table-stats tbody tr:hover {
    background: transparent;
}

.statistics-page .table-stats tbody tr:last-child td {
    border-bottom: 0;
}

.statistics-page .description {
    width: 100%;
    margin-top: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: rgba(226, 229, 252, 0.76);
    background: transparent;
}

.statistics-page .right-content .description {
    margin-top: 0;
}

.statistics-page .description > h3 {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    color: #e2e5fc;
    font-family: Philosopher-Regular, serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
}

.statistics-page .description p {
    margin: 0 0 14px;
    line-height: 1.65;
}

.statistics-page .description p:last-child {
    margin-bottom: 0;
}

.statistics-page .description strong {
    color: #f4d58e;
    font-family: AvenirNextCyr-Medium, sans-serif;
    font-weight: 400;
}

.statistics-page .description .stats-wrapper {
    display: block;
    margin-top: 18px;
}

.statistics-page .description .table-container {
    background: transparent;
}

.statistics-page .description .table-stats {
    min-width: 420px;
}

.statistics-page .crest-ally,
.statistics-page .crest-clan,
.statistics-page .crest-icon {
    display: inline-block;
    flex: 0 0 auto;
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
    vertical-align: middle;
}

.statistics-page .crest-clan {
    margin-right: 8px;
}

.statistics-page .clan-ally-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.statistics-page .text-muted {
    color: rgba(226, 229, 252, 0.46) !important;
}

.statistics-page .text-success {
    color: #82ce8a !important;
}

@media (max-width: 980px) {
    .statistics-page {
        padding: 96px 15px 64px;
    }

    .statistics-page #stats > .stats-wrapper {
        grid-template-columns: 1fr;
    }

    .statistics-page .right-content .description {
        margin-top: 0;
    }
}

@media (max-width: 700px) {
    .statistics-page {
        padding: 88px 12px 48px;
    }

    .statistics-page__heading {
        margin-bottom: 20px;
    }

    .statistics-page__heading h1 {
        font-size: 36px;
    }

    .statistics-page .nav-tabs {
        justify-content: flex-start;
        width: 100%;
        padding: 0;
        border-radius: 0;
    }

    .statistics-page .nav-link {
        min-height: 40px;
        padding: 9px 13px;
        border-radius: 11px;
        font-size: 12px;
    }

    .statistics-page .stats-updated {
        margin-top: 10px;
        font-size: 11px;
    }

    .statistics-page .tab-content {
        margin-top: 26px;
    }

    .statistics-page .tab-pane {
        padding: 0;
        border-radius: 0;
    }

    .statistics-page .tab-pane > h3 {
        margin-bottom: 20px;
        padding: 0 6px;
        font-size: 26px;
    }

    .statistics-page .stats-wrapper {
        flex-direction: column;
        gap: 16px;
    }

    .statistics-page .table-container {
        border-radius: 16px;
    }

    .statistics-page .table-stats {
        min-width: 560px;
        font-size: 13px;
    }

    .statistics-page .table-stats th,
    .statistics-page .table-stats td {
        padding: 12px;
    }

    .statistics-page .description {
        margin-top: 16px;
        padding: 0;
        border-radius: 0;
        font-size: 14px;
    }

    .statistics-page .description > h3 {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .statistics-page .nav-link,
    .statistics-page .table-stats tbody tr {
        transition: none;
    }
}
