.profile-page-v4 {
    --profile-accent: #8fbaff;
    --profile-accent-rgb: 143, 186, 255;
    --profile-accent-strong: #547bd8;
    --profile-accent-soft: rgba(143, 186, 255, .11);
    --profile-surface: rgba(18, 20, 30, .88);
    --profile-surface-strong: #151721;
    --profile-border: rgba(255, 255, 255, .075);
    --profile-border-soft: rgba(255, 255, 255, .05);
    padding: 0 0 64px;
    color: #f7f8fb;
    font-family: Google Sans, sans-serif;
}

.profile-page-v4 *,
.profile-page-v4 *::before,
.profile-page-v4 *::after {
    box-sizing: border-box;
}

.profile-page-v4 button,
.profile-page-v4 a {
    font-family: inherit;
}

.profile-page-v4 button:focus-visible,
.profile-page-v4 a:focus-visible {
    outline: 2px solid rgba(var(--profile-accent-rgb), .8);
    outline-offset: 3px;
}

.profile-page-v4 .profile-page-header,
.profile-v4-layout {
    width: 100%;
}

.profile-page-v4 .profile-page-header {
    margin-top: 28px;
    margin-bottom: 18px;
}

.profile-page-v4 .profile-page-header .group-icon img,
.profile-dialog-header .group-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.profile-v4-layout {
    display: grid;
    gap: 22px;
}

.profile-account-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--profile-border);
    border-radius: 20px;
    background:
        linear-gradient(112deg, rgba(var(--profile-accent-rgb), .075), transparent 31%),
        var(--profile-surface);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .035),
        0 14px 34px rgba(0, 0, 0, .13);
}

.profile-account-identity,
.profile-account-name-row,
.profile-account-meta-row,
.profile-account-logout,
.profile-account-wallet,
.profile-balance-actions,
.profile-setting-row,
.profile-freespin-card {
    display: flex;
    align-items: center;
}

.profile-account-identity {
    min-width: 0;
    gap: 16px;
}

.profile-avatar-control {
    flex: 0 0 84px;
    display: grid;
    justify-items: center;
    gap: 6px;
}

.profile-account-avatar {
    width: 76px;
    height: 76px;
    display: block;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: #11131b;
    object-fit: cover;
}

.profile-avatar-change {
    min-height: 32px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--profile-accent);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    white-space: nowrap;
}

.profile-avatar-change:hover {
    color: #fff;
}

.profile-avatar-change__icon {
    display: none;
}

.profile-account-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.profile-account-name-row {
    min-width: 0;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-account-name-row h1 {
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    color: #f9fbff;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.05;
    text-overflow: ellipsis;
}

.profile-current-rank {
    min-height: 32px;
    padding: 2px 10px 2px 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(var(--profile-accent-rgb), .24);
    border-radius: 999px;
    background: var(--profile-accent-soft);
    color: #f7f8fb;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.profile-current-rank img {
    width: 25px;
    height: 25px;
    display: block;
    object-fit: contain;
}

.profile-account-meta-row {
    flex-wrap: wrap;
    gap: 3px 12px;
    margin-top: 7px;
}

.profile-account-meta {
    margin: 0;
    color: #afb3bf;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.profile-account-meta span {
    margin-inline: 5px;
    color: #4f525c;
}

.profile-account-logout {
    gap: 5px;
    min-height: 28px;
    color: #bd8588;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.profile-account-logout img {
    width: 15px;
    height: 15px;
    opacity: .7;
}

.profile-account-logout:hover {
    color: #e2a0a3;
}

.profile-account-wallet {
    width: auto;
    min-width: 0;
    align-self: stretch;
    justify-content: space-between;
    gap: 16px;
    padding-left: 22px;
    border-left: 1px solid var(--profile-border-soft);
}

.profile-balance-copy {
    min-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.profile-balance-copy > span,
.profile-balance-copy small {
    color: #9b9faa;
    font-size: 13px;
    font-weight: 600;
}

.profile-balance-copy strong {
    color: #fff;
    font-size: clamp(24px, 2.3vw, 31px);
    font-weight: 850;
    line-height: 1.06;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.profile-balance-actions {
    gap: 8px;
}

.profile-action {
    min-height: 44px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--profile-border);
    border-radius: 12px;
    color: #eff1f6;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

.profile-action--primary {
    border-color: rgba(var(--profile-accent-rgb), .35);
    background: var(--profile-accent-strong);
    color: #fff;
}

.profile-action--secondary {
    background: #1d1f2a;
}

.profile-action:hover {
    border-color: rgba(255, 255, 255, .15);
    color: #fff;
}

.profile-secondary-button {
    min-height: 44px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 12px;
    background: #20222e;
    color: #eef0f5;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
}

.profile-secondary-button:hover {
    border-color: rgba(var(--profile-accent-rgb), .34);
    color: #fff;
}

.profile-section-title,
.profile-setting h3 {
    margin: 0;
    color: #f3f4f7;
    font-weight: 750;
}

.profile-section-title {
    margin-bottom: 12px;
    font-size: 19px;
    line-height: 1.2;
}

.profile-stat-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--profile-border);
    border-radius: 18px;
    background:
        linear-gradient(90deg,
            rgba(143, 186, 255, .065) 0%,
            rgba(174, 142, 255, .05) 36%,
            rgba(84, 204, 155, .045) 68%,
            rgba(232, 176, 91, .055) 100%),
        linear-gradient(145deg, rgba(20, 23, 34, .9), rgba(14, 16, 24, .82));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .025),
        0 14px 34px rgba(0, 0, 0, .1);
}

.profile-stat-item {
    --stat-rgb: var(--profile-accent-rgb);
    position: relative;
    min-width: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: transparent;
}

.profile-stat-item--wager {
    --stat-rgb: 143, 186, 255;
}

.profile-stat-item--bets {
    --stat-rgb: 174, 142, 255;
}

.profile-stat-item--deposits {
    --stat-rgb: 84, 204, 155;
}

.profile-stat-item--referrals {
    --stat-rgb: 232, 176, 91;
}

.profile-stat-item + .profile-stat-item {
    border-left: 1px solid var(--profile-border-soft);
}

.profile-stat-heading,
.profile-stat-item small,
.profile-stat-item > a {
    color: #a2a6b1;
    font-size: 14px;
    font-weight: 600;
}

.profile-stat-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #b9bdc8;
}

.profile-stat-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(var(--stat-rgb), .2);
    border-radius: 11px;
    background: rgba(var(--stat-rgb), .09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.profile-stat-icon .icon-mask {
    width: 17px;
    height: 17px;
    background: rgb(var(--stat-rgb));
}

.profile-stat-item > strong {
    overflow: hidden;
    color: #f9fbff;
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 820;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.profile-stat-item > a {
    width: max-content;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    color: var(--profile-accent);
    text-decoration: none;
}

.profile-stat-action {
    width: max-content;
    margin-top: 2px;
    cursor: pointer;
}

.profile-ranks-inline {
    position: relative;
    scroll-margin-top: 118px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid rgba(var(--profile-accent-rgb), .14);
    border-radius: 24px;
    background:
        radial-gradient(circle at 12% 12%, rgba(var(--profile-accent-rgb), .03), transparent 25%),
        linear-gradient(145deg, rgba(24, 27, 39, .96), rgba(14, 16, 24, .94));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .045),
        0 18px 42px rgba(0, 0, 0, .15);
}

.profile-ranks-inline__heading,
.profile-ranks-inline__title,
.profile-rank-inline-progress > div,
.profile-rank-inline-primary {
    display: flex;
    align-items: center;
}

.profile-ranks-inline__heading {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 9px;
}

.profile-ranks-inline__title {
    gap: 10px;
}

.profile-ranks-inline__title h2 {
    margin: 0;
    color: #f7f8fb;
    font-size: 20px;
    font-weight: 790;
    line-height: 1.1;
}

.profile-ranks-inline__icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(var(--profile-accent-rgb), .16);
    border-radius: 12px;
    background: rgba(var(--profile-accent-rgb), .09);
}

.profile-ranks-inline__icon .icon-mask {
    width: 19px;
    height: 19px;
    background: var(--profile-accent);
}

.profile-ranks-inline__xp {
    min-height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    color: #d8dbe3;
    font-size: 13px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.profile-rank-track {
    padding: 3px 2px 9px;
    display: grid;
    grid-template-columns: repeat(10, minmax(78px, 1fr));
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-color: rgba(var(--profile-accent-rgb), .34) transparent;
    scrollbar-width: thin;
}

.profile-rank-track::-webkit-scrollbar {
    height: 5px;
}

.profile-rank-track::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(var(--profile-accent-rgb), .34);
}

.profile-rank-track-item {
    --rank-rgb: var(--profile-accent-rgb);
    position: relative;
    min-width: 0;
    min-height: 124px;
    padding: 6px 5px 7px;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 2px;
    scroll-snap-align: start;
    border: 1px solid rgba(var(--rank-rgb), .1);
    border-radius: 17px;
    background: linear-gradient(180deg, rgba(var(--rank-rgb), .075), rgba(255, 255, 255, .018));
    color: #eef0f5;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.profile-rank-track-item:hover {
    border-color: rgba(var(--rank-rgb), .34);
    transform: translateY(-2px);
}

.profile-rank-track-item.is-active {
    border-color: rgba(var(--rank-rgb), .72);
    background: linear-gradient(180deg, rgba(var(--rank-rgb), .18), rgba(var(--rank-rgb), .045));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .06),
        0 0 0 3px rgba(var(--rank-rgb), .07);
}

.profile-rank-track-item.is-locked:not(.is-active) {
    color: #b6bac4;
}

.profile-rank-track-emblem,
.profile-rank-track-emblem img {
    width: 60px;
    height: 60px;
    display: block;
}

.profile-rank-track-emblem img {
    object-fit: contain;
    filter: drop-shadow(0 8px 13px rgba(var(--rank-rgb), .2));
}

.profile-rank-track-item.is-locked:not(.is-active) .profile-rank-track-emblem img {
    opacity: .72;
}

.profile-rank-track-name {
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-rank-track-xp,
.profile-rank-track-state {
    color: #9296a2;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.15;
    white-space: nowrap;
}

.profile-rank-track-item.is-active .profile-rank-track-state {
    color: rgb(var(--rank-rgb));
}

.profile-rank-panels {
    margin-top: 12px;
}

.profile-rank-inline-panel {
    --rank-rgb: var(--profile-accent-rgb);
    position: relative;
    min-width: 0;
    padding: 16px;
    display: grid;
    grid-template-columns: 158px minmax(200px, .8fr) minmax(0, 1.35fr);
    align-items: center;
    gap: 14px;
    overflow: hidden;
    border: 1px solid rgba(var(--rank-rgb), .16);
    border-radius: 20px;
    background:
        radial-gradient(circle at 9% 50%, rgba(var(--rank-rgb), .025), transparent 25%),
        rgba(9, 11, 18, .48);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.profile-rank-inline-panel[hidden] {
    display: none;
}

.profile-rank-inline-visual {
    position: relative;
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
}

.profile-rank-inline-halo {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: rgba(var(--rank-rgb), .18);
    filter: blur(25px);
}

.profile-rank-inline-visual img {
    position: relative;
    width: 146px;
    height: 146px;
    display: block;
    filter: drop-shadow(0 14px 22px rgba(var(--rank-rgb), .25));
    object-fit: contain;
}

.profile-rank-inline-copy {
    min-width: 0;
}

.profile-rank-inline-copy h3 {
    margin: 0 0 13px;
    color: #fff;
    font-size: 27px;
    font-weight: 840;
    line-height: 1;
}

.profile-rank-inline-primary {
    flex-wrap: wrap;
    gap: 18px;
}

.profile-rank-inline-primary > span {
    min-width: 82px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-rank-inline-primary small,
.profile-rank-inline-perks span {
    color: #9599a5;
    font-size: 13px;
    font-weight: 600;
}

.profile-rank-inline-primary strong {
    color: #f2f3f7;
    font-size: 17px;
    font-weight: 780;
}

.profile-rank-inline-progress {
    margin-top: 14px;
}

.profile-rank-inline-progress > div {
    justify-content: space-between;
    gap: 10px;
    color: #a7abb5;
    font-size: 12px;
    font-weight: 650;
}

.profile-rank-inline-progress > div strong {
    color: #dfe1e7;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.profile-rank-inline-progressbar {
    width: 100%;
    height: 7px;
    margin-top: 7px;
    display: block;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .075);
}

.profile-rank-inline-progressbar > span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: rgb(var(--rank-rgb));
    box-shadow: 0 0 12px rgba(var(--rank-rgb), .3);
}

.profile-rank-inline-note {
    margin: 14px 0 0;
    color: #b1b5bf;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.profile-rank-inline-perks {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(var(--rank-rgb), .09);
    border-radius: 14px;
}

.profile-rank-inline-perks > div {
    min-width: 0;
    min-height: 66px;
    padding: 10px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border-right: 1px solid rgba(var(--rank-rgb), .08);
    border-bottom: 1px solid rgba(var(--rank-rgb), .08);
    background: rgba(255, 255, 255, .018);
}

.profile-rank-inline-perks > div:nth-child(3n) {
    border-right: 0;
}

.profile-rank-inline-perks > div:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.profile-rank-inline-perks strong {
    overflow: hidden;
    color: #eff1f5;
    font-size: 14px;
    font-weight: 740;
    line-height: 1.2;
    text-overflow: ellipsis;
}

.profile-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    align-items: flex-start;
    gap: 32px;
}

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

.profile-setting h3 {
    font-size: 16px;
}

.profile-theme-setting {
    min-width: 0;
}

.profile-theme-setting > h3 {
    margin-bottom: 14px;
}

.profile-settings-side {
    min-width: 0;
    width: 100%;
    padding-left: 32px;
    display: grid;
    align-self: stretch;
    border-left: 1px solid var(--profile-border-soft);
}

.profile-settings-side .profile-setting {
    width: 100%;
}

.profile-settings-side .profile-setting + .profile-setting {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--profile-border-soft);
}

.profile-snow-setting {
    margin-top: 18px;
    padding-inline: 14px;
    border: 1px solid var(--profile-border);
    border-radius: 14px;
    background: var(--profile-surface);
}

:root:not([data-candy-theme="winter"]) .profile-snow-setting {
    display: none;
}

.profile-snow-setting .profile-setting-icon {
    color: var(--profile-accent);
    font-size: 19px;
}

.profile-snow-setting .profile-setting-row {
    position: relative;
    padding-block: 8px;
    font-weight: 700;
    cursor: pointer;
}

.profile-snow-setting .profile-setting-row + .profile-setting-row {
    border-top: 1px solid var(--profile-border-soft);
}

.profile-snow-setting__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.profile-snow-setting__switch {
    display: flex;
    align-items: center;
    flex: 0 0 44px;
    height: 26px;
    margin-inline-start: auto;
    padding: 0 3px;
    border: 1px solid var(--profile-border);
    border-radius: 999px;
    background: #2a2d39;
}

.profile-snow-setting__switch::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
}

.profile-snow-setting__input:checked + .profile-snow-setting__switch {
    background: var(--profile-accent-strong);
}

.profile-snow-setting__input:checked + .profile-snow-setting__switch::before {
    transform: translateX(18px);
}

.profile-snow-setting__select {
    flex: 0 0 auto;
    min-height: 36px;
    margin-inline-start: auto;
    padding-inline: 10px 6px;
    color: #f7f8fb;
    color-scheme: dark;
    font-size: 14px;
    background: #181a24;
    border: 1px solid var(--profile-border);
    border-radius: 9px;
    cursor: pointer;
}

.profile-snow-setting__input:focus-visible + .profile-snow-setting__switch,
.profile-snow-setting__select:focus-visible {
    outline: 2px solid var(--profile-accent);
    outline-offset: 3px;
}

.season-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(96px, 1fr));
    gap: 8px;
}

.season-card {
    --season-rgb: var(--profile-accent-rgb);
    width: 100%;
    min-width: 0;
    padding: 6px 3px 0;
    display: grid;
    justify-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: #dfe1e7;
    cursor: pointer;
}

.season-card--spring {
    --season-rgb: 224, 126, 164;
}

.season-card--summer {
    --season-rgb: 57, 183, 154;
}

.season-card--autumn {
    --season-rgb: 224, 147, 63;
}

.season-card--winter {
    --season-rgb: 125, 184, 255;
}

.season-card__preview {
    position: relative;
    width: 98px;
    height: 98px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(var(--season-rgb), .14);
    border-radius: 22px;
    background: radial-gradient(circle at 50% 42%, rgba(var(--season-rgb), .25), rgba(var(--season-rgb), .07) 55%, rgba(255, 255, 255, .015) 74%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055);
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.season-card__preview img {
    position: relative;
    z-index: 1;
    width: 92px;
    height: 92px;
    display: block;
    filter: drop-shadow(0 10px 16px rgba(var(--season-rgb), .2));
    object-fit: contain;
}

.season-card__copy {
    min-height: 38px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.season-card__copy strong {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
}

.season-card__copy small {
    color: #a0a4af;
    font-size: 13px;
    font-weight: 650;
}

.season-card__check {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 21px;
    height: 21px;
    display: none;
    place-items: center;
    border: 2px solid #11131b;
    border-radius: 50%;
    background: var(--profile-accent-strong);
    color: #fff;
    font-size: 11px;
    font-weight: 850;
}

.season-card.is-active .season-card__preview {
    border-color: rgba(var(--season-rgb), .82);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .09),
        0 0 0 3px rgba(var(--season-rgb), .09);
}

.season-card.is-active .season-card__check {
    display: grid;
}

.season-card.is-disabled {
    cursor: not-allowed;
}

.season-card.is-disabled .season-card__preview img {
    opacity: .72;
}

.season-card.is-disabled .season-card__copy strong {
    color: #a8acb7;
}

.season-card:not(.is-disabled):hover .season-card__preview {
    border-color: rgba(var(--season-rgb), .48);
    transform: translateY(-2px);
}

.profile-setting-row {
    min-height: 62px;
    gap: 12px;
}

.profile-setting-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--profile-border-soft);
    border-radius: 11px;
    background: #181a24;
}

.profile-setting-icon img {
    width: 21px;
    height: 21px;
    object-fit: contain;
}

.profile-setting-row > div {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
}

.profile-setting-row h3 {
    margin: 0;
    line-height: 1.15;
}

.profile-setting-row strong,
.profile-freespin-info strong {
    overflow: hidden;
    color: #b8bcc7;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-setting-row small,
.profile-freespin-info span {
    color: #9a9eaa;
    font-size: 13px;
    font-weight: 550;
}

.profile-setting-action,
.profile-setting-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.profile-setting-status {
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid rgba(var(--profile-accent-rgb), .16);
    border-radius: 11px;
    background: var(--profile-accent-soft);
    color: var(--profile-accent);
    font-size: 14px;
    font-weight: 700;
}

.profile-freespins-list {
    margin-top: 12px;
    max-height: 112px;
    padding-right: 5px;
    display: grid;
    gap: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(var(--profile-accent-rgb), .4) rgba(255, 255, 255, .035);
    scrollbar-width: thin;
}

.profile-freespins-list::-webkit-scrollbar {
    width: 5px;
}

.profile-freespins-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
}

.profile-freespins-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(var(--profile-accent-rgb), .4);
}

.profile-freespin-card {
    min-width: 0;
    min-height: 64px;
    padding: 7px;
    gap: 10px;
    border: 1px solid rgba(var(--profile-accent-rgb), .1);
    border-radius: 13px;
    background: linear-gradient(100deg, rgba(var(--profile-accent-rgb), .075), rgba(255, 255, 255, .018));
}

.profile-freespin-image,
.profile-freespin-image img {
    width: 50px;
    height: 50px;
    display: block;
    border-radius: 11px;
}

.profile-freespin-image img {
    object-fit: cover;
}

.profile-freespin-info {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-freespin-btn {
    min-height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 9px;
    background: var(--profile-accent-strong);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.profile-ranks-overlay,
.profile-avatar-overlay {
    position: fixed;
    z-index: 10050;
    inset: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 7, 11, .84);
}

.profile-ranks-overlay[hidden],
.profile-avatar-overlay[hidden],
[data-ranks-list-view][hidden],
[data-ranks-detail-view][hidden],
[data-rank-detail-panel][hidden] {
    display: none;
}

.profile-avatar-overlay:not([hidden]) {
    animation: wagerResetOverlayIn .18s ease-out both;
}

.profile-avatar-overlay:not([hidden]) .profile-avatar-dialog {
    animation: wagerResetModalIn .18s ease-out both;
}

.profile-ranks-dialog,
.profile-avatar-dialog {
    position: relative;
    z-index: 1;
    width: min(900px, 100%);
    max-height: calc(100dvh - 40px);
    padding: 18px;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 20px;
    background: #12141d;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .54);
    outline: none;
}

.profile-dialog-backdrop {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: default;
}

.profile-avatar-dialog {
    width: min(420px, 100%);
}

.profile-dialog-header {
    margin: 0 0 14px !important;
}

.profile-dialog-header .group-icon,
.profile-dialog-header .modal-close-btn {
    width: 42px;
    height: 42px;
    border-radius: 11px;
}

.profile-dialog-header .modal-close-btn {
    display: grid;
    place-items: center;
    border: 1px solid var(--profile-border-soft);
    background: #191b25;
    color: #8d9099;
    cursor: pointer;
}

.profile-dialog-header .modal-close-btn:hover {
    color: #fff;
}

.profile-ranks-icon .icon-mask {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, .88);
}

.profile-ranks-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.profile-rank-list-item {
    width: 100%;
    min-width: 0;
    min-height: 82px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto auto 18px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--profile-border-soft);
    border-radius: 14px;
    background: #171923;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.profile-rank-list-item:hover {
    border-color: rgba(255, 255, 255, .13);
    background: #1b1d28;
}

.profile-rank-list-item.is-current {
    border-color: rgba(var(--profile-accent-rgb), .36);
    background: var(--profile-accent-soft);
}

.profile-rank-list-emblem,
.profile-rank-list-emblem img {
    width: 58px;
    height: 58px;
    display: block;
}

.profile-rank-list-emblem img {
    object-fit: contain;
}

.profile-rank-list-copy,
.profile-rank-list-cashback {
    display: flex;
    flex-direction: column;
}

.profile-rank-list-copy {
    min-width: 0;
    gap: 3px;
}

.profile-rank-list-title {
    overflow: hidden;
    color: #f4f5f8;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-rank-list-xp,
.profile-rank-list-cashback small {
    color: #9b9faa;
    font-size: 13px;
    font-weight: 600;
}

.profile-rank-list-cashback {
    align-items: flex-end;
    gap: 2px;
}

.profile-rank-list-cashback strong {
    color: #f2f3f7;
    font-size: 14px;
    font-weight: 750;
}

.profile-rank-list-state {
    min-width: 72px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #222430;
    color: #a5a9b4;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.profile-rank-list-item.is-current .profile-rank-list-state {
    background: var(--profile-accent-strong);
    color: #fff;
}

.profile-rank-list-chevron {
    display: grid;
    place-items: center;
    color: #696c76;
}

.profile-rank-list-item:hover .profile-rank-list-chevron {
    color: #fff;
}

.profile-ranks-back {
    min-height: 44px;
    margin-bottom: 12px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--profile-border);
    border-radius: 10px;
    background: #1a1c27;
    color: #dfe1e7;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.profile-rank-detail-hero {
    min-height: 190px;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    border-top: 1px solid var(--profile-border-soft);
    border-bottom: 1px solid var(--profile-border-soft);
}

.profile-rank-detail-emblem,
.profile-rank-detail-emblem img {
    width: 170px;
    height: 170px;
    display: block;
}

.profile-rank-detail-emblem img {
    object-fit: contain;
}

.profile-rank-detail-copy {
    min-width: 0;
}

.profile-rank-detail-state {
    display: block;
    color: var(--profile-accent);
    font-size: 13px;
    font-weight: 750;
}

.profile-rank-detail-copy h4 {
    margin: 4px 0 15px;
    color: #fff;
    font-size: 30px;
    font-weight: 850;
    line-height: 1;
}

.profile-rank-detail-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.profile-rank-detail-primary > span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-rank-detail-primary small {
    color: #9b9faa;
    font-size: 13px;
    font-weight: 600;
}

.profile-rank-detail-primary strong {
    color: #f2f3f7;
    font-size: 18px;
    font-weight: 780;
}

.profile-rank-perks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--profile-border-soft);
}

.profile-rank-perks > div {
    min-width: 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 1px solid var(--profile-border-soft);
    border-bottom: 1px solid var(--profile-border-soft);
}

.profile-rank-perks > div:nth-child(3n) {
    border-right: 0;
}

.profile-rank-perks > div:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.profile-rank-perks span {
    color: #9b9faa;
    font-size: 13px;
    font-weight: 600;
}

.profile-rank-perks strong {
    color: #eef0f5;
    font-size: 14px;
    font-weight: 730;
}

.profile-avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.avatar-choose {
    position: relative;
    aspect-ratio: 1;
    padding: 5px;
    overflow: hidden;
    border: 1px solid var(--profile-border);
    border-radius: 16px;
    background: #171923;
    cursor: pointer;
}

:root:not([data-candy-theme="winter"]) .profile-avatar-grid .avatar-choose[data-avatar-winter],
:root[data-candy-theme="winter"] .profile-avatar-grid .avatar-choose:not([data-avatar-winter]) {
    display: none;
}

.avatar-choose picture {
    display: block;
    height: 100%;
}

.avatar-choose img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 11px;
    object-fit: cover;
}

.avatar-choose:hover {
    border-color: rgba(255, 255, 255, .18);
}

.avatar-choose.active {
    border-color: rgba(var(--profile-accent-rgb), .8);
}

.avatar-choose__check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    display: none;
    place-items: center;
    border: 2px solid #171923;
    border-radius: 50%;
    background: var(--profile-accent-strong);
    color: #fff;
    font-size: 11px;
    font-weight: 850;
}

.avatar-choose.active .avatar-choose__check {
    display: grid;
}

@media (max-width: 1040px) {
    .profile-account-card {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .profile-account-wallet {
        width: 100%;
        padding: 14px 0 0;
        justify-content: space-between;
        border-top: 1px solid var(--profile-border-soft);
        border-left: 0;
    }

    .profile-balance-copy {
        align-items: flex-start;
    }

}

@media (max-width: 820px) {
    .profile-stat-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-stat-item + .profile-stat-item {
        border-left: 0;
    }

    .profile-stat-item:nth-child(even) {
        border-left: 1px solid var(--profile-border-soft);
    }

    .profile-stat-item:nth-child(n + 3) {
        border-top: 1px solid var(--profile-border-soft);
    }

    .profile-rank-track {
        grid-template-columns: none;
        grid-auto-columns: 96px;
        grid-auto-flow: column;
    }

    .profile-rank-inline-panel {
        grid-template-columns: 140px minmax(0, 1fr);
    }

    .profile-rank-inline-visual {
        width: 136px;
        height: 136px;
    }

    .profile-rank-inline-visual img {
        width: 132px;
        height: 132px;
    }

    .profile-rank-inline-perks {
        grid-column: 1 / -1;
    }

    .profile-ranks-list {
        grid-template-columns: 1fr;
    }

    .profile-rank-detail-hero {
        grid-template-columns: 140px minmax(0, 1fr);
    }

    .profile-rank-detail-emblem,
    .profile-rank-detail-emblem img {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 768px) {
    .profile-page-v4 {
        padding-bottom: 112px;
    }

    .profile-page-v4 .profile-page-header {
        margin-top: 18px;
        margin-bottom: 16px;
    }

    .profile-v4-layout {
        gap: 18px;
    }

    .profile-account-card {
        padding: 14px;
        border-radius: 17px;
    }

    .profile-settings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .profile-setting,
    .profile-theme-setting,
    .profile-social-setting,
    .profile-freespin-setting {
        width: 100%;
        max-width: none;
    }

    .profile-settings-side {
        padding: 18px 0 0;
        border-top: 1px solid var(--profile-border-soft);
        border-left: 0;
    }

    .season-grid {
        grid-template-columns: repeat(4, 96px);
    }

    .profile-ranks-overlay,
    .profile-avatar-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .profile-ranks-dialog,
    .profile-avatar-dialog {
        max-height: calc(100dvh - 20px);
        padding: 14px;
        border-radius: 18px;
    }
}

@media (max-width: 560px) {
    .profile-account-identity {
        align-items: flex-start;
        gap: 11px;
    }

    .profile-avatar-control {
        position: relative;
        flex-basis: 70px;
    }

    .profile-account-avatar {
        width: 66px;
        height: 66px;
        border-radius: 15px;
    }

    .profile-avatar-change {
        position: absolute;
        top: 43px;
        right: 0;
        width: 28px;
        min-height: 28px;
        padding: 0;
        display: grid;
        place-items: center;
        border: 2px solid #151721;
        border-radius: 9px;
        background: var(--profile-accent-strong);
        color: #fff;
        box-shadow: 0 5px 14px rgba(0, 0, 0, .32);
        white-space: normal;
    }

    .profile-avatar-change__label {
        display: none;
    }

    .profile-avatar-change__icon {
        display: block;
    }

    .profile-account-name-row {
        align-items: flex-start;
        gap: 6px;
    }

    .profile-account-name-row h1 {
        font-size: 21px;
    }

    .profile-account-wallet {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .profile-balance-copy {
        min-width: 0;
    }

    .profile-balance-copy strong {
        max-width: 100%;
        overflow: hidden;
        font-size: 25px;
        text-overflow: ellipsis;
    }

    .profile-balance-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-action {
        min-width: 0;
        padding-inline: 9px;
    }

    .profile-stat-item {
        min-height: 120px;
        padding: 12px;
    }

    .profile-stat-item > strong {
        font-size: clamp(18px, 5.7vw, 23px);
    }

    .profile-stat-action {
        width: 100%;
        min-height: 44px;
        padding-inline: 9px;
        white-space: normal;
    }

    .profile-ranks-inline {
        padding: 13px;
        border-radius: 20px;
    }

    .profile-ranks-inline__heading {
        margin-bottom: 8px;
    }

    .profile-ranks-inline__title h2 {
        font-size: 19px;
    }

    .profile-rank-track {
        grid-auto-columns: 88px;
        gap: 7px;
    }

    .profile-rank-track-item {
        min-height: 122px;
        border-radius: 15px;
    }

    .profile-rank-track-emblem,
    .profile-rank-track-emblem img {
        width: 58px;
        height: 58px;
    }

    .profile-rank-inline-panel {
        padding: 12px;
        grid-template-columns: 98px minmax(0, 1fr);
        gap: 12px;
        border-radius: 17px;
    }

    .profile-rank-inline-visual,
    .profile-rank-inline-visual img {
        width: 96px;
        height: 96px;
    }

    .profile-rank-inline-copy h3 {
        margin-bottom: 11px;
        font-size: 22px;
    }

    .profile-rank-inline-primary {
        gap: 9px;
    }

    .profile-rank-inline-primary strong {
        font-size: 15px;
    }

    .profile-rank-inline-progress > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .profile-rank-inline-perks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
    }

    .profile-rank-inline-perks > div {
        min-height: 62px;
        padding: 9px;
    }

    .profile-rank-inline-perks > div,
    .profile-rank-inline-perks > div:nth-child(3n) {
        border-right: 1px solid rgba(var(--rank-rgb), .08);
        border-bottom: 1px solid rgba(var(--rank-rgb), .08);
    }

    .profile-rank-inline-perks > div:nth-child(even) {
        border-right: 0;
    }

    .profile-rank-inline-perks > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .season-grid {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 12px;
    }

    .season-card {
        width: 100%;
    }

    .season-card__preview {
        width: 112px;
        height: 112px;
    }

    .season-card__preview img {
        width: 104px;
        height: 104px;
    }

    .profile-freespins-list {
        max-height: 224px;
    }

    .profile-setting-row {
        align-items: center;
    }

    .profile-rank-list-item {
        grid-template-columns: 52px minmax(0, 1fr) auto 18px;
        gap: 7px;
    }

    .profile-rank-list-emblem,
    .profile-rank-list-emblem img {
        width: 52px;
        height: 52px;
    }

    .profile-rank-list-state {
        display: none;
    }

    .profile-rank-detail-hero {
        min-height: 0;
        padding: 8px 0 16px;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 12px;
    }

    .profile-rank-detail-emblem,
    .profile-rank-detail-emblem img {
        width: 112px;
        height: 112px;
    }

    .profile-rank-detail-copy h4 {
        margin-bottom: 11px;
        font-size: 23px;
    }

    .profile-rank-detail-primary {
        gap: 11px;
    }

    .profile-rank-detail-primary strong {
        font-size: 14px;
    }

    .profile-rank-perks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-rank-perks > div,
    .profile-rank-perks > div:nth-child(3n) {
        border-right: 1px solid var(--profile-border-soft);
        border-bottom: 1px solid var(--profile-border-soft);
    }

    .profile-rank-perks > div:nth-child(even) {
        border-right: 0;
    }

    .profile-rank-perks > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .profile-avatar-grid {
        gap: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-page-v4 *,
    .profile-page-v4 *::before,
    .profile-page-v4 *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
