/**
 * RedNetCraft — UI components & site-wide refresh
 * Подключается после style.css на всех публичных страницах
 */

:root {
    --rnc-accent: #F0264B;
    --rnc-accent-soft: rgba(240, 38, 75, 0.18);
    --rnc-accent-border: rgba(240, 38, 75, 0.42);
    --rnc-accent-glow: rgba(240, 38, 75, 0.15);
    --rnc-surface: rgba(255, 255, 255, 0.04);
    --rnc-surface-2: rgba(0, 0, 0, 0.22);
    --rnc-border: rgba(255, 255, 255, 0.09);
    --rnc-border-strong: rgba(255, 255, 255, 0.14);
    --rnc-text: #ffffff;
    --rnc-text-muted: rgba(255, 255, 255, 0.68);
    --rnc-text-dim: rgba(255, 255, 255, 0.45);
    --rnc-radius-lg: 18px;
    --rnc-radius-md: 14px;
    --rnc-radius-sm: 10px;
    --rnc-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    --rnc-font-display: 'Unbounded', sans-serif;
    --rnc-font-body: 'Inter', system-ui, sans-serif;
    --rnc-cmd: #8ec8ff;
}

/* ——— Global: переполнение текста (контентные блоки) ——— */
.contnet-block-a,
.ui-content-card,
.ui-sidebar-card,
.content-right-block,
.news-object,
.groups-rules,
.ui-content-panel,
.group-cabinet,
.privilege-card,
.object-history,
.forum-category-row,
.forum-topic-row,
.forum-topic-title,
.col-author,
.col-last,
.team-table-wrap,
.team-table td:not(.team-table__avatar),
.team-leader,
.team-leader__info,
.input-refferal-block,
.profile-dashboard,
.profile-dashboard > *,
.profile-dashboard__aside,
.profile-account-card,
.profile-referral-card,
.profile-wallet-card,
.profile-skin-card,
.profile-skin-card__body,
.profile-skin-hero__meta,
.header-content-object,
.list-info-history {
    min-width: 0;
    max-width: 100%;
}

.contnet-block-a,
.ui-content-card,
.ui-sidebar-card,
.content-right-block,
.news-object,
.groups-rules,
.ui-content-panel,
.profile-account-card,
.profile-referral-card,
.profile-wallet-card,
.profile-skin-card,
.group-down-b-cabinet {
    overflow-x: clip;
}

.contnet-block-a p,
.contnet-block-a li,
.contnet-block-a td,
.contnet-block-a th,
.contnet-block-a h1,
.contnet-block-a h2,
.contnet-block-a h3,
.news-object p,
.news-object h3,
.groups-rules p,
.groups-rules li,
.ui-content-panel p,
.ui-content-panel li,
.privilege-card p,
.privilege-card h3,
.object-history p,
.profile-account-row .left-info-account,
.profile-account-row .right-info-account,
p.info-history,
p.text-info-ref,
.profile-skin-card__hint,
.profile-hero .profile-h2 {
    overflow-wrap: break-word;
    word-break: break-word;
}

.object-info-account,
.profile-account-row {
    min-width: 0;
}

.object-info-account > *,
.profile-account-row > * {
    min-width: 0;
    max-width: 100%;
}

p.left-info-account,
p.right-info-account,
.left-info-account,
.right-info-account {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

.custom-input-1,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="search"],
textarea,
select {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

input#refferal_link,
input.refferal,
input[readonly].custom-input-1 {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.privilege-card p,
.privilege-server {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    max-width: 100%;
}

.object-history {
    flex-wrap: wrap;
    gap: 6px 12px;
    row-gap: 4px;
}

p.history-left-text {
    flex: 1 1 140px;
    min-width: 0;
}

p.history-right-text {
    flex: 0 1 auto;
    min-width: 0;
    text-align: right;
}

.profile-hero {
    min-width: 0;
}

.profile-hero .profile-h2 {
    flex: 1 1 200px;
    min-width: 0;
}

.profile-hero__badge {
    flex: 0 1 auto;
    max-width: 100%;
}

.profile-hero__badge .right-allert,
.profile-panel-head__badge .right-allert {
    max-width: 100%;
    white-space: normal;
    text-align: left;
}

.panel.panel-main .profile-history-block .top-info-cabinet-right {
    flex-wrap: wrap;
    min-width: 0;
}

.forum-topic-title,
.col-author,
.team-table__player {
    overflow-wrap: break-word;
    word-break: break-word;
}

.team-leader__name {
    max-width: 100%;
}

/* Явное однострочное обрезание — только где нужно */
p.user-email,
body.page-profile .left-cabinet .text-li-profile,
.profile-referral-card .text-refferal-count {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

body.inner-page .contnet-block-a table,
body.page-profile .profile-history-block table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

body.inner-page .contnet-block-a td,
body.inner-page .contnet-block-a th,
body.page-profile .profile-history-block td,
body.page-profile .profile-history-block th {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ——— Inner pages layout ——— */
body.inner-page {
    background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(240, 38, 75, 0.08) 0%, transparent 55%),
                linear-gradient(180deg, #0e0e12 0%, #121218 40%, #0a0a0e 100%);
}

body.inner-page .content-main {
    margin-top: 24px !important;
    gap: 20px;
    align-items: flex-start;
}

body.inner-page .left-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* ——— Content card ——— */
body.inner-page .contnet-block-a,
.ui-content-card {
    border-radius: var(--rnc-radius-lg);
    background: linear-gradient(145deg, var(--rnc-surface) 0%, var(--rnc-surface-2) 100%);
    border: 1px solid var(--rnc-border);
    box-shadow: var(--rnc-shadow);
    padding: clamp(20px, 3vw, 32px) clamp(18px, 3.5vw, 40px);
    backdrop-filter: blur(8px);
}

body.inner-page h1.main-h1,
body.inner-page .news-h1 {
    font-family: var(--rnc-font-display);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    color: var(--rnc-text);
    margin: 0;
    letter-spacing: -0.02em;
}

body.inner-page section.content-sections {
    margin-bottom: 22px;
}

body.inner-page p.description-main-p,
body.inner-page p.main-p {
    font-family: var(--rnc-font-body);
    font-size: 14px;
    line-height: 1.7;
    color: var(--rnc-text-muted);
    margin-top: 12px;
}

/* ——— Pill tabs ——— */
body.inner-page .group-buttons,
.ui-pill-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

body.inner-page .group-buttons .custom-button-2.rules-obj.small,
.ui-pill-tabs .custom-button-2.rules-obj.small {
    height: auto;
    min-height: 38px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--rnc-border);
    color: var(--rnc-text-muted);
    font-family: var(--rnc-font-body);
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

body.inner-page .group-buttons .custom-button-2.rules-obj.small:hover,
body.inner-page .group-buttons .custom-button-2.rules-obj.small.active,
.ui-pill-tabs .custom-button-2.rules-obj.small:hover,
.ui-pill-tabs .custom-button-2.rules-obj.small.active {
    background: var(--rnc-accent-soft);
    border-color: var(--rnc-accent-border);
    color: #fff;
    outline: none;
    box-shadow: 0 0 20px var(--rnc-accent-glow);
}

/* ——— Rules / commands content panel ——— */
body.inner-page .groups-rules,
.ui-content-panel {
    position: relative;
    border-radius: var(--rnc-radius-md);
    background: linear-gradient(145deg, var(--rnc-surface) 0%, var(--rnc-surface-2) 100%);
    border: 1px solid var(--rnc-border);
    padding: clamp(20px, 3vw, 28px) clamp(18px, 3vw, 32px);
    margin-top: 20px;
    overflow: hidden;
}

body.inner-page .groups-rules::before,
.ui-content-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--rnc-accent) 0%, rgba(240, 38, 75, 0.12) 100%);
    border-radius: 4px 0 0 4px;
}

body.inner-page p.title-rules-text {
    color: #fff;
    font-family: var(--rnc-font-display);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    padding-left: 8px;
}

body.inner-page ul.ul-rules-object {
    margin: 0 0 0 6px;
    padding-left: 18px;
    display: grid;
    gap: 10px;
    list-style: none;
}

body.inner-page .rules-object {
    display: grid;
    gap: 18px;
}

body.inner-page .group-rules-object-b {
    display: grid;
    gap: 8px;
}

body.inner-page p.rules-object-text {
    color: var(--rnc-text-muted);
    font-family: var(--rnc-font-body);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.65;
    margin: 0;
}

body.inner-page cb,
body.inner-page p.rules-object-text cb {
    color: var(--rnc-cmd);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 600;
    font-size: 12px;
    background: rgba(142, 200, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 1;
}

/* ——— Sidebar ——— */
body.inner-page .right-block {
    gap: 14px;
}

body.inner-page .content-right-block,
.ui-sidebar-card {
    border-radius: var(--rnc-radius-md);
    background: linear-gradient(160deg, rgba(27, 27, 30, 0.95) 0%, rgba(14, 14, 18, 0.98) 100%);
    border: 1px solid var(--rnc-border);
    box-shadow: var(--rnc-shadow);
    padding: clamp(18px, 2.5vw, 28px) clamp(16px, 2vw, 24px);
}

body.inner-page .top-info-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rnc-border);
}

body.inner-page .top-info-block .text-block {
    font-family: var(--rnc-font-display);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

body.inner-page .top-info-block img {
    width: 22px;
    height: 22px;
    opacity: 0.9;
}

body.inner-page ul.navigations-link {
    display: grid;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

body.inner-page li.navigation-link-a {
    display: block;
}

body.inner-page a.navigation-link-a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: var(--rnc-radius-sm);
    font-family: var(--rnc-font-body);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

body.inner-page a.navigation-link-a::after {
    display: none;
}

body.inner-page a.navigation-link-a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--rnc-border);
    color: #fff;
}

body.inner-page a.navigation-link-a.red-link,
body.inner-page a.navigation-link-a.active-nav {
    background: var(--rnc-accent-soft);
    border-color: var(--rnc-accent-border);
    color: #fff;
    box-shadow: 0 0 16px var(--rnc-accent-glow);
}

body.inner-page .custom-input-1 {
    border-radius: var(--rnc-radius-sm);
    border: 1px solid var(--rnc-border-strong);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: var(--rnc-font-body);
    transition: border-color 0.2s;
}

body.inner-page .custom-input-1:focus {
    border-color: var(--rnc-accent-border);
    outline: none;
}

body.inner-page button.custom-button-2.login {
    width: 100%;
    border-radius: var(--rnc-radius-sm);
    font-family: var(--rnc-font-body);
    font-weight: 600;
}

/* ——— Home: плавный переход hero → контент (как inner-page) ——— */
body.home-page {
    background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(240, 38, 75, 0.08) 0%, transparent 55%),
                linear-gradient(180deg, #0e0e12 0%, #121218 40%, #0a0a0e 100%);
    background-color: #0e0e12;
}

body.home-page .header {
    position: relative;
    isolation: isolate;
    background-color: #0e0e12;
    background-image:
        linear-gradient(180deg,
            rgba(14, 14, 18, 0.05) 0%,
            rgba(14, 14, 18, 0.35) 42%,
            rgba(14, 14, 18, 0.78) 68%,
            #0e0e12 92%),
        radial-gradient(ellipse 85% 55% at 72% 18%, rgba(240, 38, 75, 0.14) 0%, transparent 58%),
        radial-gradient(ellipse 60% 40% at 12% 30%, rgba(88, 42, 120, 0.2) 0%, transparent 55%),
        url(/img/header-backgroumd.png);
    background-size: cover, cover, cover, cover;
    background-position: center top, center top, center top, center top;
    background-repeat: no-repeat;
    padding-bottom: 128px;
}

body.home-page .header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(42vh, 360px);
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(180deg, transparent 0%, rgba(14, 14, 18, 0.55) 38%, #0e0e12 100%),
        linear-gradient(rgba(240, 38, 75, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(240, 38, 75, 0.04) 1px, transparent 1px);
    background-size: 100% 100%, 32px 32px, 32px 32px;
}

body.home-page .header > .border {
    position: relative;
    z-index: 1;
}

body.home-page .header-top {
    background: rgba(10, 10, 14, 0.62);
    border: 1px solid var(--rnc-border);
    backdrop-filter: blur(16px);
}

body.home-page .header-center {
    background: rgba(10, 10, 14, 0.48);
    border: 1px solid rgba(240, 38, 75, 0.14);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

body.home-page a.header-content-object {
    border: 1px solid var(--rnc-border);
    background: rgba(10, 10, 14, 0.5);
    backdrop-filter: blur(14px);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

body.home-page a.header-content-object:hover {
    border-color: var(--rnc-accent-border);
    transform: translateY(-2px);
}

body.home-page .link-header-a {
    font-family: var(--rnc-font-body);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    padding: 8px 12px;
}

body.home-page .link-header.active .link-header-a,
body.home-page .link-header-a.active {
    background: var(--rnc-accent-soft);
    color: #fff !important;
}

body.home-page .content-main {
    margin-top: -64px !important;
    gap: 20px;
    position: relative;
    z-index: 2;
}

body.home-page .home-content-page {
    position: relative;
    z-index: 2;
}

body.home-page .content-right-block,
body.home-page .content-right-block.ui-sidebar-card {
    border-radius: var(--rnc-radius-lg);
    background: linear-gradient(160deg, rgba(27, 27, 30, 0.95) 0%, rgba(14, 14, 18, 0.98) 100%);
    border: 1px solid var(--rnc-border);
    box-shadow: var(--rnc-shadow);
}

body.home-page .top-info-block .text-block {
    font-family: var(--rnc-font-display);
    font-size: 15px;
    font-weight: 600;
}

body.home-page a.navigation-link-a {
    font-family: var(--rnc-font-body);
    border-radius: var(--rnc-radius-sm);
    transition: background 0.2s ease, color 0.2s ease;
}

body.home-page a.navigation-link-a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

body.home-page a.navigation-link-a.active-nav {
    background: var(--rnc-accent-soft);
    border: 1px solid var(--rnc-accent-border);
    color: #fff;
}

/* ——— Home news feed ——— */
body.page-main .news-object,
body.home-page .news-object {
    border-radius: var(--rnc-radius-md);
    border: 1px solid var(--rnc-border);
    background: linear-gradient(145deg, var(--rnc-surface) 0%, var(--rnc-surface-2) 100%);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    margin-bottom: 16px;
}

body.page-main .news-object:hover,
body.home-page .news-object:hover {
    border-color: var(--rnc-accent-border);
    transform: translateY(-2px);
}

body.page-main p.top-info-b,
body.home-page p.top-info-b {
    font-family: var(--rnc-font-display);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

body.page-main p.news-text-a,
body.home-page p.news-text-a {
    font-family: var(--rnc-font-body);
    font-size: 13px;
    line-height: 1.65;
    color: var(--rnc-text-muted);
}

body.page-main .custom-button-2,
body.home-page .left-info-news .custom-button-2 {
    border-radius: 999px;
    padding: 8px 18px;
    font-family: var(--rnc-font-body);
    font-size: 12px;
    font-weight: 600;
}

body.page-main .number-page-news,
body.home-page .number-page-news {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

body.page-main a.button-number-page,
body.home-page a.button-number-page {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--rnc-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--rnc-text-muted);
    text-decoration: none;
    font-family: var(--rnc-font-body);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

body.page-main a.button-number-page:hover,
body.home-page a.button-number-page:hover,
body.page-main a.button-number-page.active,
body.home-page a.button-number-page.active {
    background: var(--rnc-accent-soft);
    border-color: var(--rnc-accent-border);
    color: #fff;
}

/* ——— News article ——— */
body.page-news .news-object {
    border-radius: var(--rnc-radius-md);
    border: 1px solid var(--rnc-border);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}

body.page-news .news-object:hover {
    border-color: var(--rnc-accent-border);
    transform: translateY(-2px);
}

body.page-news .news-border {
    padding: 20px 22px;
}

body.page-news .top-news-a {
    border-radius: var(--rnc-radius-sm);
    overflow: hidden;
    margin: 16px 0;
}

body.page-news .news-content-b {
    font-family: var(--rnc-font-body);
    font-size: 14px;
    line-height: 1.75;
    color: var(--rnc-text-muted);
}

body.page-news .news-content-b h2,
body.page-news .news-content-b h3 {
    font-family: var(--rnc-font-display);
    color: #fff;
    margin: 1.2em 0 0.5em;
}

/* ——— Donates store page ——— */
body.page-donates {
    background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 255, 255, 0.03) 0%, transparent 55%),
                linear-gradient(180deg, #0e0e12 0%, #121218 40%, #0a0a0e 100%);
}

body.page-donates .rnc-store-page.left-block {
    border: 1px solid var(--rnc-border);
    overflow: visible;
}

body.page-donates .block-info-donate {
    border-radius: 0;
    background: transparent;
    border: none;
    padding: clamp(16px, 2vw, 24px);
    overflow: visible;
}

body.page-donates .rnc-store-hero.contnet-block-a {
    border: none;
    box-shadow: none;
}

body.page-donates p.table-name {
    font-family: var(--rnc-font-display);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 14px;
}

body.page-donates .table-wrapper {
    border-radius: var(--rnc-radius-sm);
    border: 1px solid var(--rnc-border);
    overflow-x: auto;
}

body.page-donates table.privilege-table {
    font-family: var(--rnc-font-body);
    font-size: 12px;
}

body.page-donates table.privilege-table th {
    background: rgba(240, 38, 75, 0.12);
    color: #fff;
    font-weight: 600;
    padding: 12px 14px;
    border-bottom: 1px solid var(--rnc-border);
}

body.page-donates table.privilege-table td {
    padding: 10px 14px;
    color: var(--rnc-text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

body.page-donates table.privilege-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* ——— Video grid ——— */
body.page-video .group-videos {
    display: grid;
    gap: 24px;
    margin-top: 8px;
}

body.page-video .list-video {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

body.page-video a.object-video {
    display: block;
    border-radius: var(--rnc-radius-md);
    border: 1px solid var(--rnc-border);
    overflow: hidden;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s, transform 0.2s;
}

body.page-video a.object-video:hover {
    border-color: var(--rnc-accent-border);
    transform: translateY(-3px);
}

body.page-video .image-video {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
}

body.page-video h4.title-video,
body.page-video p.title-video {
    font-family: var(--rnc-font-body);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    padding: 12px 14px 8px;
    margin: 0;
    line-height: 1.4;
}

body.page-video .live-object {
    padding: 0 14px 12px;
}

/* ——— Profile: сайдбар кабинета ——— */
body.page-profile .group-cabinet {
    border-radius: var(--rnc-radius-md);
    border: 1px solid var(--rnc-border);
    background: rgba(22, 22, 26, 0.96);
    padding: 12px;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

body.page-profile ul.ul-group-info,
body.page-profile ul.rate-list-ul {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

body.page-profile .cabinet-main {
    margin-top: 24px;
}

body.page-profile .title-group-info {
    margin: 0 0 6px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    line-height: 1.3;
}

body.page-profile .li-group-info {
    border: 1px solid transparent;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

body.page-profile .li-group-info:hover {
    color: #E8E8E8;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.06);
}

body.page-profile .li-group-info.active {
    color: #FFF;
    background: rgba(240, 38, 75, 0.12);
    box-shadow: inset 3px 0 0 #F0264B;
    border-color: rgba(240, 38, 75, 0.22);
}

body.page-profile .ico-profile-li {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.page-profile .ico-profile-li .ico-profile-svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

body.page-profile .li-group-info:hover .ico-profile-li {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.1);
}

body.page-profile .li-group-info.active .ico-profile-li {
    background: rgba(240, 38, 75, 0.18);
    color: #F0264B;
    border-color: rgba(240, 38, 75, 0.35);
}

body.page-profile .text-li-profile {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.page-profile .rate-object-li {
    border-radius: 10px;
    padding: 0 10px;
    height: 40px;
    box-sizing: border-box;
}

body.page-profile .rate-object-li:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

body.page-profile .left-cabinet {
    gap: 12px;
}

body.page-profile .discord-frame {
    border-radius: var(--rnc-radius-md);
    overflow: hidden;
}

/* RedNet: красная сетка (куб / net) в кабинете */
body.page-profile .cabinet-main-block .border {
    background-image:
        linear-gradient(rgba(240, 38, 75, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(240, 38, 75, 0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    background-position: center top;
}

body.page-profile .profile-wallet-card--rub {
    border-color: rgba(240, 38, 75, 0.14) !important;
}

/* ——— Legal pages ——— */
body.page-privacy .contnet-block-a p,
body.page-terms .contnet-block-a p,
body.page-privacy .contnet-block-a li,
body.page-terms .contnet-block-a li {
    font-family: var(--rnc-font-body);
    font-size: 14px;
    line-height: 1.75;
    color: var(--rnc-text-muted);
}

/* ——— Header polish (inner) ——— */
body.inner-page .header {
    position: relative;
    z-index: 200;
    background: rgba(10, 10, 14, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rnc-border);
}

body.inner-page .link-header-a {
    font-family: var(--rnc-font-body);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.2s;
}

body.inner-page .link-header.active .link-header-a,
body.inner-page .link-header-a.active {
    background: var(--rnc-accent-soft);
    color: #fff !important;
}

/* ——— Forum ——— */
body.page-forum .contnet-block-a,
body.page-forum .forum-category-row,
body.page-forum .forum-topic-row {
    border-radius: var(--rnc-radius-md);
}

body.page-forum .forum-category-row,
body.page-forum .forum-topic-row {
    border: 1px solid var(--rnc-border);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s;
}

body.page-forum .forum-category-row:hover,
body.page-forum .forum-topic-row:hover {
    border-color: var(--rnc-accent-border);
}

/* ——— Responsive ——— */
@media (max-width: 1175px) {
    body.inner-page .groups-rules,
    body.inner-page .ui-content-panel {
        padding: 18px 18px 18px 22px;
    }

    body.inner-page .group-buttons .custom-button-2.rules-obj.small {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }

    body.home-page .header {
        padding-bottom: 72px;
    }

    body.home-page .header::after {
        height: min(36vh, 260px);
    }

    body.home-page .content-main {
        margin-top: -28px !important;
    }

    body.home-page .header-center {
        background: rgba(10, 10, 14, 0.55);
        margin-top: 16px;
    }
}

@media (max-width: 640px) {
    body.inner-page .group-buttons .custom-button-2.rules-obj.small {
        flex: 1 1 100%;
    }

    body.inner-page .contnet-block-a {
        padding: 18px 16px;
    }
}

/* ——— Шапка: меню пользователя (вместо «три точки») ——— */
.header-top {
    position: relative;
    z-index: 120;
    overflow: visible;
}

.right-info,
.auth-top-ul.head-pc,
.profile-top-form {
    position: relative;
    overflow: visible;
}

body.page-profile .cabinet-main-block {
    position: relative;
    z-index: 1;
}

.rnc-user-menu {
    position: relative;
    pointer-events: auto;
}

.rnc-user-menu__trigger {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 5px;
    border-radius: var(--rnc-radius-sm);
    border: 1px solid var(--rnc-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.18) 100%),
        #1a1a1a;
    color: var(--rnc-text);
    cursor: pointer;
    pointer-events: auto;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font: inherit;
    max-width: min(240px, 42vw);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.rnc-user-menu__trigger::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #F0264B 0%, rgba(240, 38, 75, 0.35) 100%);
    opacity: 0.85;
    transition: opacity 0.2s, box-shadow 0.2s;
}

.rnc-user-menu__trigger::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 40%, rgba(240, 38, 75, 0.06) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.rnc-user-menu__trigger:hover,
.rnc-user-menu.is-open .rnc-user-menu__trigger {
    border-color: var(--rnc-accent-border);
    box-shadow: 0 0 0 1px rgba(240, 38, 75, 0.12);
}

.rnc-user-menu__trigger:hover::after,
.rnc-user-menu.is-open .rnc-user-menu__trigger::after {
    opacity: 1;
}

.rnc-user-menu.is-open .rnc-user-menu__trigger::before {
    box-shadow: 0 0 12px rgba(240, 38, 75, 0.45);
}

.rnc-user-menu__avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #16071e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rnc-user-menu__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.rnc-user-menu__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    text-align: left;
}

.rnc-user-menu__name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rnc-user-menu__balance {
    font-size: 14px;
    font-weight: 500;
    color: var(--rnc-text-muted);
    line-height: 1.25;
}

.rnc-user-menu__caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--rnc-text-muted);
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s, background 0.2s;
}

.rnc-user-menu.is-open .rnc-user-menu__caret {
    transform: rotate(180deg);
    color: var(--rnc-accent);
    background: var(--rnc-accent-soft);
}

.rnc-user-menu.is-open .rnc-user-menu__trigger {
    position: relative;
    z-index: 2;
}

.rnc-user-menu__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 184px;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(240, 38, 75, 0.32);
    background-color: #0e0e12;
    box-shadow:
        0 14px 36px rgba(0, 0, 0, 0.72),
        0 0 0 1px rgba(0, 0, 0, 0.65),
        0 0 24px rgba(240, 38, 75, 0.1);
    display: grid;
    gap: 2px;
    pointer-events: auto;
    isolation: isolate;
    overflow: hidden;
}

.rnc-user-menu__panel.is-portal {
    position: fixed !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 100000 !important;
    background-color: #0e0e12 !important;
    display: grid !important;
    pointer-events: auto;
}

.rnc-user-menu__panel::before {
    content: "";
    position: absolute;
    right: 18px;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    background-color: #0e0e12;
    border: 1px solid rgba(240, 38, 75, 0.32);
    border-bottom: none;
    border-right: none;
    top: -5px;
    z-index: 0;
}

.rnc-user-menu__panel::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #0e0e12;
    z-index: 0;
    pointer-events: none;
}

.rnc-user-menu__panel[hidden] {
    display: none !important;
    pointer-events: none;
}

.rnc-user-menu.is-open .rnc-user-menu__panel {
    display: grid !important;
    pointer-events: auto;
}

.rnc-hum-auth {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 280px;
    text-align: center;
}

.rnc-hum-auth__name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.rnc-hum-auth__balance {
    margin: -6px 0 0;
    font-size: 14px;
    color: var(--rnc-text-muted);
}

.rnc-hum-auth__btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.rnc-user-menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 9px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: #0e0e12;
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-align: left;
    font-family: inherit;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.rnc-user-menu__item svg {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    opacity: 0.7;
}

.rnc-user-menu__item:hover,
.rnc-user-menu__item:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--rnc-border);
    color: #fff;
    outline: none;
}

.rnc-user-menu__item--danger {
    color: #ff8fa8;
}

.rnc-user-menu__item--danger:hover,
.rnc-user-menu__item--danger:focus-visible {
    background: var(--rnc-accent-soft);
    border-color: var(--rnc-accent-border);
    color: #fff;
}

.rnc-user-menu__divider {
    height: 1px;
    margin: 2px 5px;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
}

@media (max-width: 1175px) {
    .auth-top-ul.head-pc.auth-top-ul--user {
        display: flex !important;
    }
}

@media (max-width: 900px) {
    .rnc-user-menu__meta {
        display: none;
    }

    .rnc-user-menu__trigger {
        padding: 4px 6px 4px 4px;
        gap: 6px;
    }
}
