.egf-pro-page {
    max-width: 1160px;
    margin: 0 auto 36px auto;
}

.egf-pro-heading {
    margin-bottom: 18px;
}

.egf-pro-intro {
    max-width: 860px;
    margin: 0 0 22px 0;
    line-height: 1.55;
}

.egf-pro-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.egf-pro-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    margin: 0;
    font-size: 14px;
}

.egf-pro-table th,
.egf-pro-table td {
    padding: 11px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #edf2f7;
}

.egf-pro-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.egf-pro-table tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

.egf-pro-table tbody tr:hover,
.egf-pro-table tbody tr:focus {
    background: #f8fbff;
    outline: none;
}

.egf-pro-table tbody tr:last-child td {
    border-bottom: 0;
}

.egf-pro-photo-head,
.egf-pro-photo-cell {
    width: 74px;
    text-align: center;
}

.egf-pro-country-head,
.egf-pro-country-cell {
    width: 155px;
}

.egf-pro-level-cell,
.egf-pro-gor-cell,
.egf-pro-profile-cell {
    width: 100px;
    text-align: center;
}

.egf-pro-avatar {
    display: inline-block;
    width: 54px;
    height: 54px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: inset 0 0 0 1px #d8e0ea;
    vertical-align: middle;
}

.egf-pro-avatar img,
.egf-pro-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.egf-pro-avatar-empty,
.egf-pro-modal-avatar-empty {
    background: #f1f5f9;
}

.egf-pro-player-main {
    font-weight: 700;
    line-height: 1.2;
}

.egf-pro-flag {
    margin-right: 5px;
    font-size: 18px;
}

.egf-pro-profile-button,
.egf-pro-modal-link {
    display: inline-block;
    border: 1px solid #b9c7d8;
    background: #fff;
    color: #244a77;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}

.egf-pro-profile-button {
    padding: 6px 11px;
    font-size: 12px;
    line-height: 1;
}

.egf-pro-modal-link {
    padding: 8px 14px;
}

.egf-pro-profile-button:hover,
.egf-pro-profile-button:focus,
.egf-pro-modal-link:hover,
.egf-pro-modal-link:focus {
    background: #eef5ff;
    border-color: #7fa4d7;
    text-decoration: none;
}

.egf-pro-no-profile {
    color: #94a3b8;
}

.egf-pro-alert {
    padding: 16px;
    color: #7a2530;
    background: #fff5f5;
}

.egf-pro-modal[hidden] {
    display: none;
}

.egf-pro-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.egf-pro-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.54);
}

.egf-pro-modal-card {
    position: relative;
    z-index: 1;
    width: min(820px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.26);
    padding: 24px;
}

.egf-pro-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
}

.egf-pro-modal-top {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 24px;
    align-items: center;
    padding-right: 26px;
}

.egf-pro-modal-avatar {
    display: block;
    width: 170px;
    height: 170px;
    border-radius: 18px;
    overflow: hidden;
    background: #eef2f7;
    box-shadow: inset 0 0 0 1px #d8e0ea;
}

.egf-pro-modal-head-text h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
}

.egf-pro-modal-level {
    color: #64748b;
    font-size: 18px;
    font-weight: 600;
}

.egf-pro-modal-subtitle,
.egf-pro-modal-ldp-line,
.egf-pro-modal-became {
    margin-top: 8px;
    color: #64748b;
    font-size: 14px;
}

.egf-pro-modal-ldp-line {
    font-weight: 600;
}

.egf-pro-modal-bio {
    margin-top: 22px;
    line-height: 1.6;
    color: #334155;
}

.egf-pro-modal-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 14px;
    margin-top: 20px;
}

.egf-pro-modal-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.egf-pro-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.egf-pro-stat-card strong,
.egf-pro-stat-card span {
    display: block;
}

.egf-pro-stat-card span {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.egf-pro-winrate-circle {
    --egf-pro-winrate: 0;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(#d2a31a calc(var(--egf-pro-winrate) * 1%), #efe5b4 0);
}

.egf-pro-winrate-circle span {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0;
    color: #8a6a00;
    background: #fff;
    font-weight: 700;
    font-size: 12px;
}

.egf-pro-gor-graph {
    position: relative;
    min-height: 170px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.egf-pro-gor-graph-title {
    margin-bottom: 6px;
    color: #334155;
    font-weight: 700;
}

.egf-pro-gor-graph svg {
    width: 100%;
    height: 160px;
    display: block;
}

.egf-pro-gor-area {
    fill: rgba(243, 205, 74, 0.28);
}

.egf-pro-gor-line {
    fill: none;
    stroke: #c99a11;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.egf-pro-gor-dot {
    fill: #c99a11;
}

.egf-pro-gor-axis {
    fill: #6b7280;
    font-size: 11px;
}

.egf-pro-gor-grid {
    stroke: #eadfb1;
    stroke-width: 1;
}

.egf-pro-gor-tick {
    stroke: #b7bec8;
    stroke-width: 1;
}

.egf-pro-gor-dot {
    cursor: pointer;
}

.egf-pro-gor-dot-current {
    stroke: #fff8dc;
    stroke-width: 1.5;
}

.egf-pro-modal-tournaments {
    margin-top: 18px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.egf-pro-modal-tournaments ul {
    margin: 8px 0 0 0;
    padding: 0;
    list-style: none;
}

.egf-pro-modal-tournaments li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #edf2f7;
    color: #334155;
}

.egf-pro-modal-tournaments li:first-child {
    border-top: 0;
}

.egf-pro-modal-tournaments em {
    flex: 0 0 auto;
    color: #64748b;
    font-style: normal;
    font-weight: 700;
}

.egf-pro-modal-extra {
    margin-top: 16px;
    color: #334155;
}

.egf-pro-modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

body.egf-pro-modal-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .egf-pro-page {
        margin-bottom: 24px;
    }

    .egf-pro-intro {
        font-size: 14px;
    }

    .egf-pro-wrap {
        border-radius: 12px;
        overflow: visible;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .egf-pro-table,
    .egf-pro-table tbody,
    .egf-pro-table tr,
    .egf-pro-table td {
        display: block;
        width: 100%;
    }

    .egf-pro-table thead {
        display: none;
    }

    .egf-pro-table tr {
        position: relative;
        display: grid;
        grid-template-columns: 62px minmax(0, 1fr) auto;
        grid-template-areas:
            "photo name profile"
            "photo rank gor";
        gap: 3px 10px;
        margin: 0 0 10px 0;
        padding: 10px;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 13px;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    }

    .egf-pro-table td {
        border: 0;
        padding: 0;
    }

    .egf-pro-photo-cell {
        grid-area: photo;
        width: auto;
        text-align: left;
    }

    .egf-pro-avatar {
        width: 58px;
        height: 58px;
    }

    .egf-pro-player-cell {
        grid-area: name;
        min-width: 0;
        align-self: center;
    }

    .egf-pro-player-main {
        font-size: 15px;
    }

    .egf-pro-country-cell {
        display: none;
    }

    .egf-pro-level-cell,
    .egf-pro-gor-cell {
        display: inline-block;
        width: auto;
        text-align: left;
        color: #64748b;
        font-size: 12px;
        line-height: 1.3;
    }

    .egf-pro-level-cell {
        grid-area: rank;
    }

    .egf-pro-gor-cell {
        grid-area: gor;
        text-align: right;
    }

    .egf-pro-level-cell::before {
        content: 'Rank: ';
        font-weight: 700;
    }

    .egf-pro-gor-cell::before {
        content: 'GoR: ';
        font-weight: 700;
    }

    .egf-pro-profile-cell {
        grid-area: profile;
        width: auto;
        text-align: right;
        align-self: center;
    }

    .egf-pro-profile-button {
        padding: 6px 9px;
        font-size: 11px;
    }

    .egf-pro-modal {
        align-items: center;
        justify-content: center;
        padding: 12px;
    }

    .egf-pro-modal-card {
        width: 100%;
        max-height: calc(100vh - 24px);
        border-radius: 16px;
        padding: 18px;
    }

    .egf-pro-modal-top {
        grid-template-columns: 96px 1fr;
        gap: 14px;
        padding-right: 26px;
        align-items: start;
    }

    .egf-pro-modal-avatar {
        width: 96px;
        height: 96px;
        border-radius: 14px;
    }

    .egf-pro-modal-head-text h2 {
        font-size: 21px;
    }

    .egf-pro-modal-level {
        font-size: 15px;
    }

    .egf-pro-modal-subtitle,
    .egf-pro-modal-ldp-line,
    .egf-pro-modal-became {
        font-size: 13px;
    }

    .egf-pro-modal-bio {
        margin-top: 16px;
    }

    .egf-pro-modal-dashboard {
        display: block;
    }

    .egf-pro-modal-stats {
        margin-bottom: 10px;
    }

    .egf-pro-stat-card {
        padding: 10px;
    }

    .egf-pro-gor-graph {
        margin-top: 10px;
    }

    .egf-pro-modal-tournaments li {
        display: block;
    }

    .egf-pro-modal-tournaments em {
        display: block;
        margin-top: 3px;
    }
}

.egf-pro-tournament-main {
    min-width: 0;
}

.egf-pro-tournament-title {
    font-weight: 600;
    line-height: 1.35;
}

.egf-pro-tournament-meta {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

@media (max-width: 760px) {
    .egf-pro-modal-dashboard {
        gap: 10px;
    }

    .egf-pro-gor-graph {
        padding: 10px;
    }

    .egf-pro-gor-graph svg {
        height: 150px;
    }

    .egf-pro-modal-tournaments {
        padding: 10px;
    }

    .egf-pro-modal-tournaments li {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 8px;
    }

    .egf-pro-tournament-title {
        font-size: 13px;
    }

    .egf-pro-tournament-meta {
        font-size: 11px;
    }
}

.egf-pro-gor-tooltip {
    position: absolute;
    z-index: 2;
    max-width: 240px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(34, 44, 57, 0.94);
    color: #fff;
    font-size: 12px;
    line-height: 1.35;
    pointer-events: none;
    transform: translate(-50%, -100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.egf-pro-tournament-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 12px;
    margin-top: 10px;
    padding: 0 0 6px 0;
    border-bottom: 1px solid #edf2f7;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.egf-pro-tournament-head span:last-child {
    text-align: right;
}

.egf-pro-tournament-side {
    flex: 0 0 110px;
    text-align: right;
}

.egf-pro-tournament-gor {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.egf-pro-gor-up {
    color: #15803d;
}

.egf-pro-gor-down {
    color: #b91c1c;
}

@media (max-width: 760px) {
    .egf-pro-tournament-head {
        grid-template-columns: minmax(0, 1fr) 74px;
        gap: 8px;
    }

    .egf-pro-tournament-side {
        flex-basis: auto;
        text-align: right;
    }

    .egf-pro-tournament-gor {
        font-size: 11px;
    }
}
