/* ==========================================================================
   PORTAL TOP — «Зал славы Остова»
   --------------------------------------------------------------------------
   Отдельный слой для /p/top.php. Подключается после portal_skin_v2.css и
   portal_comments.css, поэтому может спокойно переопределять рейтинговые
   блоки старого скина. Базовая палитра — тёмное дерево, обсидиан и золото.
   ========================================================================== */

body.portal-v2 .top-page {
    --rt-gold: #f1d9a4;
    --rt-gold-2: #d8b46a;
    --rt-gold-3: #b8860b;
    --rt-ink: #f3ecdf;
    --rt-ink-2: #d2c7b8;
    --rt-muted: #b7a487;
    --rt-line: rgba(216, 180, 106, 0.24);
    --rt-line-strong: rgba(216, 180, 106, 0.52);
    --rt-panel: linear-gradient(160deg, rgba(66, 44, 26, 0.58), rgba(20, 13, 8, 0.78));
    --rt-panel-soft: rgba(86, 59, 37, 0.2);
    --rt-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   1. ОБОЛОЧКА И АТМОСФЕРА
   -------------------------------------------------------------------------- */
body.portal-v2 .top-page .portal-shell {
    position: relative;
    padding: clamp(18px, 3vw, 34px);
    border-color: rgba(216, 180, 106, 0.3);
    background:
        radial-gradient(900px 380px at 8% -12%, rgba(216, 180, 106, 0.13), transparent 62%),
        radial-gradient(720px 360px at 96% 0%, rgba(201, 106, 58, 0.08), transparent 64%),
        linear-gradient(155deg, rgba(38, 25, 15, 0.56), rgba(13, 8, 5, 0.74));
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 235, 190, 0.08),
        inset 0 0 0 1px rgba(216, 180, 106, 0.04);
}

/* Тонкая «золотая пыль» на фоне — без перекрытия контента. */
body.portal-v2 .top-page .portal-shell > .portal-page-head,
body.portal-v2 .top-page .portal-shell > .top-legend,
body.portal-v2 .top-page .portal-shell > .top-tabs,
body.portal-v2 .top-page .portal-shell > .rankBlock {
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   2. ГЕРОЙ-ЗАГОЛОВОК
   -------------------------------------------------------------------------- */
body.portal-v2 .top-page .top-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: clamp(18px, 3vw, 34px);
    overflow: hidden;
    margin: 0 0 16px;
    padding: clamp(18px, 3vw, 30px) clamp(18px, 3vw, 30px) clamp(18px, 3vw, 30px) clamp(100px, 8vw, 112px);
    border: 1px solid var(--rt-line);
    border-radius: 24px;
    background:
        radial-gradient(560px 220px at 12% 0%, rgba(216, 180, 106, 0.14), transparent 64%),
        linear-gradient(135deg, rgba(216, 180, 106, 0.08), rgba(54, 38, 22, 0.16) 52%, rgba(20, 13, 8, 0.28));
    box-shadow:
        inset 0 1px 0 rgba(255, 235, 190, 0.08),
        0 18px 40px rgba(0, 0, 0, 0.2);
}

body.portal-v2 .top-page .top-hero::before,
body.portal-v2 .top-page .top-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
}

body.portal-v2 .top-page .top-hero::before {
    top: -150px;
    right: -80px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(216, 180, 106, 0.18);
    background: repeating-conic-gradient(
        from 0deg,
        rgba(216, 180, 106, 0.13) 0deg 2deg,
        transparent 2deg 11deg
    );
    opacity: 0.34;
    transform: rotate(-14deg);
}

body.portal-v2 .top-page .top-hero::after {
    top: -90px;
    right: -18px;
    width: 210px;
    height: 210px;
    border: 1px dashed rgba(241, 217, 164, 0.2);
    opacity: 0.5;
}

body.portal-v2 .top-page .top-hero .portal-page-head__main,
body.portal-v2 .top-page .top-hero .portal-page-head__aside {
    position: relative;
    z-index: 1;
}

body.portal-v2 .top-page .top-hero .portal-page-head__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--rt-gold-2);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

body.portal-v2 .top-page .top-hero .portal-page-head__eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--rt-gold-2));
}

body.portal-v2 .top-page .top-hero h1 {
    margin: 0 0 10px;
    color: var(--rt-gold);
    background: linear-gradient(180deg, #fff6d8 0%, #e7c77e 46%, #a77c3a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.42));
    font-family: "Philosopher", "Palatino Linotype", Georgia, serif;
    font-size: clamp(32px, 4.2vw, 58px);
    font-weight: 700;
    letter-spacing: 0.015em;
    line-height: 1.05;
}

body.portal-v2 .top-page .top-hero .portal-page-head__main p {
    max-width: 660px;
    margin: 0;
    color: var(--rt-muted);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 12.5px;
    line-height: 1.7;
}

body.portal-v2 .top-page .top-hero .portal-page-head__aside {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-end;
    gap: 8px;
}

body.portal-v2 .top-page .top-hero .portal-stat {
    min-width: 100px;
    padding: 10px 13px 9px;
    border: 1px solid rgba(216, 180, 106, 0.22);
    border-radius: 13px;
    background: rgba(10, 7, 4, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 235, 190, 0.04);
    backdrop-filter: blur(8px);
    text-align: left;
}

body.portal-v2 .top-page .top-hero .portal-stat b {
    display: block;
    color: var(--rt-gold);
    font-family: "Philosopher", "Palatino Linotype", Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 0 16px rgba(255, 215, 0, 0.12);
}

body.portal-v2 .top-page .top-hero .portal-stat span {
    display: block;
    margin-top: 4px;
    color: var(--rt-muted);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 8.5px;
    letter-spacing: 0.12em;
    line-height: 1.3;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   3. ПОДСКАЗКА-ЛЕГЕНДА
   -------------------------------------------------------------------------- */
body.portal-v2 .top-page .top-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    margin: 0 0 18px;
    padding: 9px 14px;
    border: 1px dashed rgba(216, 180, 106, 0.2);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.14);
    color: var(--rt-muted);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 10px;
    line-height: 1.4;
}

body.portal-v2 .top-page .top-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.portal-v2 .top-page .top-legend__icon {
    color: var(--rt-gold-2);
    font-size: 12px;
    font-style: normal;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.3));
}

body.portal-v2 .top-page .top-legend .top-legend__mobile {
    display: none;
}

/* --------------------------------------------------------------------------
   4. ВКЛАДКИ
   -------------------------------------------------------------------------- */
body.portal-v2 .top-page .rankingsButtonsBlock {
    margin: 0 0 20px;
}

body.portal-v2 .top-page .rankingsButtons {
    display: flex;
    width: 100%;
    gap: 5px;
    padding: 6px;
    overflow-x: auto;
    border: 1px solid var(--rt-line);
    border-radius: 16px;
    background: rgba(8, 5, 3, 0.46);
    box-shadow: inset 0 1px 0 rgba(255, 235, 190, 0.05), 0 10px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
    scrollbar-width: thin;
    scrollbar-color: rgba(216, 180, 106, 0.35) transparent;
}

body.portal-v2 .top-page .rankingsButtons::-webkit-scrollbar {
    height: 4px;
}

body.portal-v2 .top-page .rankingsButtons::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(216, 180, 106, 0.35);
}

body.portal-v2 .top-page .rankingsButtons a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    height: auto;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--rt-muted);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.025em;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

body.portal-v2 .top-page .rankingsButtons a:hover {
    border-color: rgba(216, 180, 106, 0.24);
    background: rgba(216, 180, 106, 0.08);
    color: var(--rt-gold);
}

body.portal-v2 .top-page .rankingsButtons a.active {
    border-color: rgba(255, 240, 190, 0.68);
    background: linear-gradient(145deg, #f1d9a4, #c99a3c 58%, #a77c3a);
    color: #2a1a0c;
    box-shadow: 0 7px 18px rgba(184, 134, 11, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body.portal-v2 .top-page .rankingsButtons a.active::after {
    display: none;
}

body.portal-v2 .top-page .rankingsButtons a:focus-visible {
    outline: 2px solid var(--rt-gold);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   5. ПЕРВЫЕ ДВА МЕСТА
   -------------------------------------------------------------------------- */
body.portal-v2 .top-page .rankBlock-block {
    gap: 16px;
    margin-bottom: 18px;
}

body.portal-v2 .top-page .rank {
    position: relative;
    width: calc(50% - 8px);
    min-height: 148px;
    overflow: hidden;
    border: 1px solid var(--rt-line);
    border-radius: 22px;
    background:
        radial-gradient(420px 180px at 0% 0%, rgba(216, 180, 106, 0.1), transparent 66%),
        linear-gradient(160deg, rgba(76, 51, 31, 0.52), rgba(20, 13, 8, 0.78));
    box-shadow: var(--rt-shadow), inset 0 1px 0 rgba(255, 235, 190, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body.portal-v2 .top-page .rank::before {
    content: "";
    position: absolute;
    top: -40%;
    left: -20%;
    width: 80%;
    height: 180%;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 20%, rgba(255, 240, 200, 0.055) 45%, transparent 70%);
    transform: rotate(8deg);
}

body.portal-v2 .top-page .rank:hover {
    transform: translateY(-3px);
    border-color: rgba(241, 217, 164, 0.5);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 235, 190, 0.08);
}

body.portal-v2 .top-page .rank-first {
    border-color: rgba(241, 217, 164, 0.52);
    background:
        radial-gradient(480px 210px at 0% 0%, rgba(216, 180, 106, 0.18), transparent 66%),
        linear-gradient(160deg, rgba(94, 61, 34, 0.6), rgba(24, 15, 9, 0.8));
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.34), 0 0 32px rgba(216, 180, 106, 0.08), inset 0 0 0 1px rgba(216, 180, 106, 0.08);
}

body.portal-v2 .top-page .rank-second {
    border-color: rgba(190, 185, 176, 0.34);
    background:
        radial-gradient(480px 210px at 0% 0%, rgba(190, 185, 176, 0.12), transparent 66%),
        linear-gradient(160deg, rgba(75, 55, 38, 0.5), rgba(22, 15, 10, 0.78));
}

body.portal-v2 .top-page .rank-place {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 3;
    padding: 4px 9px;
    border: 1px solid rgba(216, 180, 106, 0.22);
    border-radius: 999px;
    background: rgba(8, 5, 3, 0.35);
    color: var(--rt-muted);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.portal-v2 .top-page .rank-first .rank-place {
    border-color: rgba(255, 235, 170, 0.42);
    color: #ffe6a2;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.12);
}

body.portal-v2 .top-page .rank-second .rank-place {
    border-color: rgba(210, 205, 195, 0.3);
    color: #d8d2c5;
}

body.portal-v2 .top-page .rank-number {
    width: 84px;
    background: linear-gradient(180deg, rgba(216, 180, 106, 0.08), rgba(0, 0, 0, 0.22));
    border-right: 1px solid rgba(216, 180, 106, 0.12);
}

body.portal-v2 .top-page .rank-number img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

body.portal-v2 .top-page .rank-info {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 13px;
    width: auto;
    min-width: 0;
    padding: 16px 16px 16px 12px;
}

/* В карточках игроков расовый силуэт заменён аватаром; у кланов силуэт остаётся. */
body.portal-v2 .top-page .rankBlock-block:not(.clan-top) .top_kind_1,
body.portal-v2 .top-page .rankBlock-block:not(.clan-top) .top_kind_2 {
    display: none;
}

body.portal-v2 .top-page .clan-top .top_kind_1,
body.portal-v2 .top-page .clan-top .top_kind_2 {
    width: 64px;
    height: 64px;
    margin-right: 4px;
    border-radius: 14px;
    opacity: 0.9;
}

body.portal-v2 .top-page .rank-avatar-frame {
    position: relative;
    display: inline-flex;
    flex: 0 0 78px;
    width: 78px;
    height: 78px;
    padding: 4px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(216, 180, 106, 0.12),
        rgba(216, 180, 106, 0.8),
        rgba(255, 240, 190, 0.95),
        rgba(184, 134, 11, 0.52),
        rgba(216, 180, 106, 0.12)
    );
    box-shadow: 0 0 0 1px rgba(255, 235, 170, 0.24), 0 12px 26px rgba(0, 0, 0, 0.34);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

body.portal-v2 .top-page .rank:hover .rank-avatar-frame {
    transform: scale(1.035);
    box-shadow: 0 0 0 1px rgba(255, 235, 170, 0.4), 0 14px 30px rgba(0, 0, 0, 0.38), 0 0 22px rgba(216, 180, 106, 0.16);
}

body.portal-v2 .top-page .rank-avatar-frame > .portal-avatar {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}

body.portal-v2 .top-page .rank-second .rank-avatar-frame {
    background: conic-gradient(
        from 0deg,
        rgba(190, 185, 176, 0.1),
        rgba(220, 218, 210, 0.68),
        rgba(255, 255, 255, 0.9),
        rgba(150, 146, 138, 0.38),
        rgba(190, 185, 176, 0.1)
    );
    box-shadow: 0 0 0 1px rgba(235, 232, 224, 0.2), 0 12px 26px rgba(0, 0, 0, 0.34);
}

body.portal-v2 .top-page .rank-avatar-frame.is-legendary {
    animation: rt-legendary-frame 3.4s ease-in-out infinite;
}

body.portal-v2 .top-page .rank-avatar-frame.is-legendary::after {
    content: "";
    position: absolute;
    inset: -5px;
    z-index: 0;
    border: 1px solid rgba(255, 236, 170, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.45), 0 0 34px rgba(255, 145, 0, 0.2);
    pointer-events: none;
    animation: rt-legendary-ring 3.4s ease-in-out infinite;
}

body.portal-v2 .top-page .rank-avatar-frame.is-legendary > .portal-avatar {
    animation: rt-legendary-avatar 3.4s ease-in-out infinite;
}

body.portal-v2 .top-page .rank-info_text {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0;
}

body.portal-v2 .top-page .rank-nickName {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 5px;
    color: var(--rt-ink);
    font-family: "Philosopher", "Palatino Linotype", Georgia, serif;
    font-size: 19px;
    line-height: 1.2;
}

body.portal-v2 .top-page .rank-nickName .user-profile-link,
body.portal-v2 .top-page .rank-first .rank-info_text .rank-nickName a,
body.portal-v2 .top-page .rank-second .rank-info_text .rank-nickName a {
    color: var(--rt-gold);
    font-size: 19px;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 0 18px rgba(255, 215, 0, 0.12);
}

body.portal-v2 .top-page .rank-nickName .user-profile-link:hover {
    color: #fff3cf;
}

body.portal-v2 .top-page .rank-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 11px;
    color: var(--rt-muted);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
}

body.portal-v2 .top-page .rank-subline span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

body.portal-v2 .top-page .rank-subline img {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(216, 180, 106, 0.28);
    border-radius: 50%;
    object-fit: cover;
}

body.portal-v2 .top-page .rank-clan {
    overflow: hidden;
    max-width: 190px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.portal-v2 .top-page .sympathy-count-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    padding: 3px 9px;
    border: 1px solid rgba(216, 180, 106, 0.2);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    color: var(--rt-muted);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 10px;
    line-height: 1.3;
}

body.portal-v2 .top-page .sympathy-count-small .sympathy-count-value {
    color: var(--rt-gold);
    font-weight: 700;
}

body.portal-v2 .top-page .rank-kills {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    margin-left: auto;
    padding: 7px 10px;
    border: 1px solid rgba(216, 180, 106, 0.22);
    border-radius: 13px;
    background: rgba(8, 5, 3, 0.34);
    color: var(--rt-gold);
    font-family: "Philosopher", "Palatino Linotype", Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

body.portal-v2 .top-page .rank-kills::before {
    content: "Рейтинг";
    margin-bottom: 4px;
    color: var(--rt-muted);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 7.5px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

body.portal-v2 .top-page .rank-first .rank-kills {
    border-color: rgba(255, 235, 170, 0.38);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.08);
}

body.portal-v2 .top-page .rank-second .rank-kills {
    color: #e4ded2;
}

/* --------------------------------------------------------------------------
   6. ТАБЛИЦЫ
   -------------------------------------------------------------------------- */
body.portal-v2 .top-page .scroll-tableBlock {
    margin-top: 16px;
    border: 1px solid var(--rt-line);
    border-radius: 18px;
    background:
        radial-gradient(680px 220px at 0% 0%, rgba(216, 180, 106, 0.06), transparent 70%),
        rgba(8, 5, 3, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 235, 190, 0.04), 0 16px 34px rgba(0, 0, 0, 0.2);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.portal-v2 .top-page .scroll-table {
    min-width: 900px;
}

body.portal-v2 .top-page .tableRank {
    width: 100%;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
}

body.portal-v2 .top-page .tableRank thead {
    background: rgba(9, 6, 4, 0.74);
}

body.portal-v2 .top-page .tableRank thead td,
body.portal-v2 .top-page .tableRank thead th {
    padding: 13px 12px;
    border: 0;
    border-bottom: 1px solid var(--rt-line-strong);
    color: var(--rt-gold-2);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
}

body.portal-v2 .top-page .tableRank thead th:first-child {
    border-radius: 14px 0 0 0;
    text-align: center;
}

body.portal-v2 .top-page .tableRank thead th:last-child {
    border-radius: 0 14px 0 0;
}

body.portal-v2 .top-page .tableRank thead th[data-sort] {
    padding-right: 26px;
    transition: color 0.16s ease, background 0.16s ease;
}

body.portal-v2 .top-page .tableRank thead th[data-sort]:hover {
    background: rgba(216, 180, 106, 0.08);
    color: #fff1c8;
}

body.portal-v2 .top-page .tableRank tbody td {
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid rgba(216, 180, 106, 0.08);
    color: var(--rt-ink-2);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
    vertical-align: middle;
}

body.portal-v2 .top-page .tableRank tbody tr {
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

body.portal-v2 .top-page .tableRank tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.014);
}

body.portal-v2 .top-page .tableRank tbody tr:hover {
    background: linear-gradient(90deg, rgba(216, 180, 106, 0.11), rgba(216, 180, 106, 0.015));
    box-shadow: inset 3px 0 0 rgba(241, 217, 164, 0.75);
}

body.portal-v2 .top-page .tableRank tbody tr:last-child td {
    border-bottom: 0;
}

body.portal-v2 .top-page .tableRank tbody td:first-child {
    width: 54px;
    color: rgba(216, 180, 106, 0.65);
    font-family: "Philosopher", "Palatino Linotype", Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

body.portal-v2 .top-page .tableRank tbody tr:nth-child(1) td:first-child {
    color: #ffe89a;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.55);
}

body.portal-v2 .top-page .tableRank tbody tr:nth-child(2) td:first-child {
    color: #e3ddd0;
    text-shadow: 0 0 10px rgba(220, 220, 220, 0.35);
}

body.portal-v2 .top-page .tableRank tbody tr:nth-child(3) td:first-child {
    color: #d6a373;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.35);
}

body.portal-v2 .top-page .rank-player-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body.portal-v2 .top-page .rank-avatar {
    position: relative;
    display: inline-flex;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

body.portal-v2 .top-page .rank-avatar > .portal-avatar {
    width: 100%;
    height: 100%;
}

/* В таблицах style.css задаёт td img размер 25×25 — возвращаем аватару
   его собственный круг и позицию. */
body.portal-v2 .top-page .tableRank .portal-avatar img {
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border: 1px solid rgba(216, 180, 106, 0.5);
    border-radius: 50%;
    box-shadow: none;
    object-fit: cover;
    transform: none;
}

body.portal-v2 .top-page .rank-avatar.is-legendary {
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.3));
}

body.portal-v2 .top-page .rank-avatar .portal-avatar-rarity {
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    font-size: 7px;
}

body.portal-v2 .top-page .rank-player-info {
    min-width: 0;
}

body.portal-v2 .top-page .rank-player-info .user-info-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

body.portal-v2 .top-page .rank-player-info .user-profile-link,
body.portal-v2 .top-page .rank-player-info .rank-player-link {
    color: var(--rt-gold);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

body.portal-v2 .top-page .rank-player-info .user-profile-link:hover {
    color: #fff1c8;
    text-decoration: none;
}

body.portal-v2 .top-page .rank-player-info .user-game-link {
    font-size: 11px;
    opacity: 0.45;
}

body.portal-v2 .top-page .rank-player-info .user-game-link:hover {
    opacity: 1;
}

body.portal-v2 .top-page .rank-player-info .online-indicator {
    width: 7px;
    height: 7px;
    margin-left: 0;
    box-shadow: 0 0 6px currentColor;
}

body.portal-v2 .top-page .rank-hero-link {
    color: var(--rt-gold);
    font-size: 12px;
    font-weight: 700;
}

body.portal-v2 .top-page .rank-hero-link:hover {
    color: #fff1c8;
}

/* --------------------------------------------------------------------------
   7. БОЕВАЯ / PVE СТАТИСТИКА
   -------------------------------------------------------------------------- */
body.portal-v2 .top-page .rank-hub-head {
    align-items: flex-end;
    margin-bottom: 16px;
    padding: 0 2px;
}

body.portal-v2 .top-page .rank-hub-eyebrow {
    color: var(--rt-gold-2);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 8.5px;
    letter-spacing: 0.2em;
}

body.portal-v2 .top-page .rank-hub-head h2 {
    color: var(--rt-gold);
    font-family: "Philosopher", "Palatino Linotype", Georgia, serif;
    font-size: clamp(25px, 2.6vw, 36px);
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

body.portal-v2 .top-page .rank-hub-head p {
    color: var(--rt-muted);
    font-size: 12px;
}

body.portal-v2 .top-page .rank-period {
    padding: 4px;
    border-color: var(--rt-line);
    border-radius: 12px;
    background: rgba(8, 5, 3, 0.38);
}

body.portal-v2 .top-page .rank-period a {
    min-height: 30px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 9px;
    letter-spacing: 0.04em;
}

body.portal-v2 .top-page .rank-period a.active {
    background: linear-gradient(145deg, rgba(241, 217, 164, 0.2), rgba(184, 134, 11, 0.16));
    box-shadow: inset 0 0 0 1px rgba(241, 217, 164, 0.2);
}

body.portal-v2 .top-page .rank-stat-grid {
    gap: 10px;
    margin-bottom: 16px;
}

body.portal-v2 .top-page .rank-stat-card {
    padding: 14px 16px;
    border-color: var(--rt-line);
    border-radius: 14px;
    background:
        radial-gradient(220px 120px at 0% 0%, rgba(216, 180, 106, 0.07), transparent 70%),
        rgba(40, 26, 16, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 235, 190, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

body.portal-v2 .top-page .rank-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(216, 180, 106, 0.4);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 235, 190, 0.06);
}

body.portal-v2 .top-page .rank-stat-card--accent {
    border-color: rgba(216, 180, 106, 0.42);
    background:
        radial-gradient(240px 130px at 0% 0%, rgba(216, 180, 106, 0.18), transparent 72%),
        rgba(56, 38, 22, 0.32);
}

body.portal-v2 .top-page .rank-stat-card span {
    color: var(--rt-muted);
    font-size: 8.5px;
    letter-spacing: 0.12em;
}

body.portal-v2 .top-page .rank-stat-card b {
    color: var(--rt-gold);
    font-family: "Philosopher", "Palatino Linotype", Georgia, serif;
}

body.portal-v2 .top-page .rank-search-row {
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(216, 180, 106, 0.16);
    border-radius: 14px;
    background: rgba(8, 5, 3, 0.22);
}

body.portal-v2 .top-page .rank-search-form input[type="text"] {
    min-height: 40px;
    border-color: rgba(216, 180, 106, 0.24);
    border-radius: 10px;
    background: rgba(8, 5, 3, 0.46);
    color: var(--rt-ink);
    font-size: 12px;
}

body.portal-v2 .top-page .rank-search-form input[type="text"]::placeholder {
    color: rgba(183, 164, 135, 0.7);
}

body.portal-v2 .top-page .rank-search-form input[type="text"]:focus {
    border-color: rgba(241, 217, 164, 0.58);
    box-shadow: 0 0 0 3px rgba(216, 180, 106, 0.1);
}

body.portal-v2 .top-page .rank-search-form .button {
    min-height: 40px;
    border-radius: 10px;
    font-size: 11px;
}

body.portal-v2 .top-page .rank-search-link {
    color: var(--rt-gold-2);
    font-size: 10px;
    font-weight: 600;
}

body.portal-v2 .top-page .rank-hub-grid {
    gap: 14px;
}

body.portal-v2 .top-page .rank-hub-panel {
    padding: 16px;
    border: 1px solid var(--rt-line);
    border-radius: 16px;
    background:
        radial-gradient(420px 200px at 0% 0%, rgba(216, 180, 106, 0.06), transparent 70%),
        rgba(40, 26, 16, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 235, 190, 0.04), 0 12px 28px rgba(0, 0, 0, 0.16);
}

body.portal-v2 .top-page .rank-hub-panel h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(216, 180, 106, 0.18);
    color: var(--rt-gold);
    font-family: "Philosopher", "Palatino Linotype", Georgia, serif;
    font-size: 17px;
    line-height: 1.2;
}

body.portal-v2 .top-page .rank-hub-empty {
    padding: 18px 10px;
    border: 1px dashed rgba(216, 180, 106, 0.18);
    border-radius: 10px;
    color: var(--rt-muted);
    font-size: 11px;
    text-align: center;
}

body.portal-v2 .top-page .rank-leader-list li {
    display: grid;
    grid-template-columns: 26px 28px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 0;
}

body.portal-v2 .top-page .rank-leader-list .rank-avatar {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
}

body.portal-v2 .top-page .rank-leader-list .rank-avatar .portal-avatar-rarity {
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    font-size: 6px;
}

body.portal-v2 .top-page .rank-leader-list li:hover {
    background: linear-gradient(90deg, rgba(216, 180, 106, 0.06), transparent);
}

body.portal-v2 .top-page .rank-type-card {
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

body.portal-v2 .top-page .rank-type-card:hover {
    transform: translateY(-2px);
    border-color: rgba(216, 180, 106, 0.34);
    background: rgba(216, 180, 106, 0.05);
}

body.portal-v2 .top-page .rank-trend-row {
    transition: background 0.16s ease;
}

body.portal-v2 .top-page .rank-trend-row:hover {
    background: rgba(216, 180, 106, 0.05);
}

/* --------------------------------------------------------------------------
   8. АНИМАЦИИ
   -------------------------------------------------------------------------- */
@keyframes rt-legendary-frame {
    0%,
    100% {
        box-shadow: 0 0 0 1px rgba(255, 235, 170, 0.28), 0 12px 26px rgba(0, 0, 0, 0.34);
    }
    50% {
        box-shadow: 0 0 0 2px rgba(255, 245, 200, 0.65), 0 14px 32px rgba(0, 0, 0, 0.4), 0 0 26px rgba(255, 215, 0, 0.3);
    }
}

@keyframes rt-legendary-ring {
    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.07);
    }
}

@keyframes rt-legendary-avatar {
    0%,
    100% {
        filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.15));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.4));
    }
}

/* --------------------------------------------------------------------------
   9. АДАПТИВНОСТЬ
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    body.portal-v2 .top-page .top-hero {
        align-items: flex-start;
        flex-direction: column;
        padding-left: clamp(18px, 3vw, 30px);
    }

    body.portal-v2 .top-page .top-hero .portal-page-head__aside {
        justify-content: flex-start;
    }

    body.portal-v2 .top-page .rank-info {
        gap: 10px;
        padding: 14px;
    }

    body.portal-v2 .top-page .rank-avatar-frame {
        flex-basis: 68px;
        width: 68px;
        height: 68px;
    }
}

@media (max-width: 900px) {
    body.portal-v2 .top-page .rank {
        width: 100%;
    }

    body.portal-v2 .top-page .rank-info {
        flex-wrap: wrap;
    }

    body.portal-v2 .top-page .rank-info_text {
        flex: 1 1 calc(100% - 160px);
    }

    body.portal-v2 .top-page .rank-kills {
        min-width: 82px;
    }

    body.portal-v2 .top-page .rank-subline .rank-clan {
        max-width: 150px;
    }

    body.portal-v2 .top-page .scroll-table {
        min-width: 860px;
    }
}

@media (max-width: 700px) {
    body.portal-v2 .top-page .portal-shell {
        padding: 14px;
    }

    body.portal-v2 .top-page .top-hero {
        padding: 16px;
        border-radius: 18px;
    }

    body.portal-v2 .top-page .top-hero h1 {
        font-size: 34px;
    }

    body.portal-v2 .top-page .top-hero .portal-page-head__main p {
        font-size: 12px;
    }

    body.portal-v2 .top-page .top-hero .portal-page-head__aside {
        width: 100%;
    }

    body.portal-v2 .top-page .top-hero .portal-stat {
        flex: 1 1 90px;
        min-width: 0;
    }

    body.portal-v2 .top-page .top-legend {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    body.portal-v2 .top-page .top-legend span {
        display: flex;
    }

    body.portal-v2 .top-page .top-legend .top-legend__mobile {
        display: inline-flex;
    }

    body.portal-v2 .top-page .rankingsButtons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
        border-radius: 14px;
    }

    body.portal-v2 .top-page .rankingsButtons a {
        width: 100%;
        min-height: 40px;
        padding: 8px 8px;
        font-size: 10px;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
    }

    body.portal-v2 .top-page .rankingsButtons a:last-child {
        grid-column: 1 / -1;
    }

    body.portal-v2 .top-page .rank {
        min-height: 0;
        border-radius: 18px;
    }

    body.portal-v2 .top-page .rank-number {
        width: 66px;
    }

    body.portal-v2 .top-page .rank-number img {
        width: 44px;
        height: 44px;
    }

    body.portal-v2 .top-page .rank-info {
        align-items: flex-start;
        gap: 10px;
        padding: 13px 13px 13px 10px;
    }

    body.portal-v2 .top-page .rank-avatar-frame {
        flex-basis: 60px;
        width: 60px;
        height: 60px;
        padding: 3px;
    }

    body.portal-v2 .top-page .rank-nickName,
    body.portal-v2 .top-page .rank-nickName .user-profile-link,
    body.portal-v2 .top-page .rank-first .rank-info_text .rank-nickName a,
    body.portal-v2 .top-page .rank-second .rank-info_text .rank-nickName a {
        font-size: 16px;
    }

    body.portal-v2 .top-page .rank-kills {
        min-width: 68px;
        padding: 6px 8px;
        font-size: 19px;
    }

    body.portal-v2 .top-page .rank-kills::before {
        font-size: 6.5px;
    }

    body.portal-v2 .top-page .rank-place {
        top: 9px;
        right: 10px;
    }

    body.portal-v2 .top-page .tableRank thead th,
    body.portal-v2 .top-page .tableRank tbody td {
        padding: 9px 10px;
    }

    body.portal-v2 .top-page .scroll-table {
        min-width: 820px;
    }

    body.portal-v2 .top-page .rank-hub-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    body.portal-v2 .top-page .rank-period {
        align-self: flex-start;
    }

    body.portal-v2 .top-page .rank-hub-panel {
        padding: 13px;
    }

    body.portal-v2 .top-page .rank-hub-panel h3 {
        font-size: 15px;
    }
}

@media (max-width: 430px) {
    body.portal-v2 .top-page .top-hero h1 {
        font-size: 29px;
    }

    body.portal-v2 .top-page .rank-info_text {
        flex-basis: 100%;
        order: 3;
    }

    body.portal-v2 .top-page .rank-kills {
        order: 2;
        margin-left: auto;
    }

    body.portal-v2 .top-page .rank-avatar-frame {
        order: 1;
    }

    body.portal-v2 .top-page .rank-subline {
        gap: 4px 8px;
    }

    body.portal-v2 .top-page .rank-clan {
        display: none;
    }

    body.portal-v2 .top-page .rank-player-cell {
        gap: 8px;
    }

    body.portal-v2 .top-page .rank-avatar {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.portal-v2 .top-page .rank,
    body.portal-v2 .top-page .rank-avatar-frame,
    body.portal-v2 .top-page .rank-avatar-frame.is-legendary,
    body.portal-v2 .top-page .rank-avatar-frame.is-legendary::after,
    body.portal-v2 .top-page .rank-avatar-frame.is-legendary > .portal-avatar,
    body.portal-v2 .top-page .rank-stat-card,
    body.portal-v2 .top-page .rank-type-card {
        animation: none !important;
        transition: none !important;
    }
}
