/**
 * =====================================================
 * XPZone Profile Page v1.2 Compact Header
 * =====================================================
 *
 * صفحة الملف الشخصي:
 * - بطاقة اللاعب الكبيرة.
 * - ملخص الرتبة.
 * - نظرة عامة.
 * - المقتنيات.
 * - الإنجازات والميداليات.
 * - نظام متجاوب للهاتف والتابلت.
 */


/* =====================================================
 * Page
 * ===================================================== */

.profile-page {
    padding-top: 22px;
    padding-bottom: 20px;
}


.profile-page-header {
    margin-bottom: 18px;

    display: grid;

    grid-template-columns:
        auto
        minmax(260px, 1fr)
        auto;

    align-items: center;

    gap: 18px;
}


.profile-page-title-row {
    display: flex;
    align-items: center;

    gap: 10px;

    white-space: nowrap;
}


.profile-page-kicker,
.profile-section-header > div > span,
.profile-content-card-header > div > span,
.profile-rank-kicker,
.profile-dialog-card > header > span {
    display: block;

    color: var(--cyan);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 1.4px;

    text-transform: uppercase;
}


.profile-page-title-row .profile-page-kicker,
.profile-page-title-row h1 {
    margin: 0;

    font-size: 12px;
    font-weight: 900;

    line-height: 1;

    letter-spacing: 1.2px;
}


.profile-page-title-row h1 {
    color: transparent;

    background:
        linear-gradient(
            90deg,
            #f8fafc,
            var(--cyan)
        );

    background-clip: text;

    -webkit-background-clip: text;
}


.profile-page-title-divider {
    color: rgba(148, 163, 184, 0.52);

    font-size: 14px;
    font-weight: 500;

    line-height: 1;
}


.profile-page-description {
    margin: 0;

    color: var(--text-muted);

    font-size: 13px;
    line-height: 1.6;

    text-align: center;
}


.profile-store-link {
    min-height: 43px;

    padding: 10px 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 1px solid rgba(0, 229, 255, 0.28);
    border-radius: 11px;

    color: var(--cyan);

    background: rgba(0, 229, 255, 0.07);

    font-size: 13px;
    font-weight: 800;

    text-decoration: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.profile-store-link:hover {
    border-color: rgba(0, 229, 255, 0.62);

    background: rgba(0, 229, 255, 0.13);

    transform: translateY(-2px);
}


/* =====================================================
 * Showcase Layout
 * ===================================================== */

.profile-showcase {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        300px;

    align-items: stretch;

    gap: 22px;
}


/* =====================================================
 * Main Player Card
 * ===================================================== */

.profile-player-card {
    position: relative;

    min-width: 0;
    min-height: 360px;

    overflow: hidden;
    isolation: isolate;

    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 24px;

    background:
        radial-gradient(
            circle at 84% 12%,
            rgba(0, 229, 255, 0.17),
            transparent 30%
        ),
        radial-gradient(
            circle at 14% 90%,
            rgba(139, 92, 246, 0.22),
            transparent 36%
        ),
        linear-gradient(
            135deg,
            #111b3a,
            #071126
        );

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.42);
}


.profile-player-card::before {
    content: "";

    position: absolute;

    z-index: 5;

    top: 0;
    right: 0;
    left: 0;

    height: 4px;

    background:
        linear-gradient(
            90deg,
            var(--purple),
            var(--cyan),
            var(--gold)
        );
}


.profile-player-background {
    position: absolute;

    z-index: -3;

    inset: 0;

    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    transform: scale(1.02);

    transition:
        opacity 0.3s ease,
        transform 0.6s ease;
}


.profile-player-background[data-has-image="false"] {
    opacity: 0;
}


.profile-player-card:hover
.profile-player-background {
    transform: scale(1.05);
}


.profile-player-overlay {
    position: absolute;

    z-index: -2;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(5, 12, 30, 0.97) 0%,
            rgba(5, 12, 30, 0.82) 47%,
            rgba(5, 12, 30, 0.42) 100%
        ),
        linear-gradient(
            180deg,
            rgba(7, 17, 38, 0.1),
            rgba(7, 17, 38, 0.88)
        );
}


.profile-player-content {
    min-height: 360px;

    padding: 22px 26px;

    display: grid;

    grid-template-rows:
        auto
        1fr
        auto;

    gap: 18px;
}


/* =====================================================
 * Player Card Loading Skeleton
 * ===================================================== */

.profile-player-skeleton {
    position: absolute;
    z-index: 7;
    inset: 22px 26px;

    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;

    pointer-events: none;
}

.profile-player-card[data-profile-loading="false"] .profile-player-skeleton {
    display: none;
}

.profile-player-card[data-profile-loading="true"] .profile-player-content {
    visibility: hidden;
}

.profile-player-skeleton-top,
.profile-player-skeleton-avatar,
.profile-player-skeleton-lines span,
.profile-player-skeleton-footer span {
    position: relative;
    overflow: hidden;

    display: block;

    border: 1px solid rgba(148, 163, 184, 0.09);
    background: rgba(148, 163, 184, 0.1);
}

.profile-player-skeleton-top {
    width: 116px;
    height: 14px;
    border-radius: 999px;
}

.profile-player-skeleton-main {
    display: flex;
    align-items: center;
    gap: clamp(24px, 4vw, 42px);
}

.profile-player-skeleton-avatar {
    width: clamp(138px, 16vw, 178px);
    height: clamp(138px, 16vw, 178px);
    flex: 0 0 auto;
    border-radius: 28%;
}

.profile-player-skeleton-lines {
    width: min(430px, 65%);
    display: grid;
    gap: 12px;
}

.profile-player-skeleton-lines span {
    height: 18px;
    border-radius: 999px;
}

.profile-player-skeleton-lines span:first-child {
    width: 78%;
    height: 34px;
}

.profile-player-skeleton-lines span:nth-child(2) {
    width: 45%;
}

.profile-player-skeleton-lines span:last-child {
    width: 58%;
}

.profile-player-skeleton-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 125px;
    gap: 20px;
}

.profile-player-skeleton-footer span {
    height: 42px;
    border-radius: 13px;
}

.profile-player-skeleton-top::after,
.profile-player-skeleton-avatar::after,
.profile-player-skeleton-lines span::after,
.profile-player-skeleton-footer span::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-120%);
    background: linear-gradient(90deg, transparent, rgba(248, 250, 252, 0.11), transparent);
    animation: profile-skeleton-shimmer 1.7s ease-in-out infinite;
}

@keyframes profile-skeleton-shimmer {
    to {
        transform: translateX(120%);
    }
}

/* =====================================================
 * Player Card Header
 * ===================================================== */

.profile-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
}


.profile-player-label {
    color: rgba(248, 250, 252, 0.67);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 1.6px;
}


.profile-customize-button {
    min-height: 37px;

    padding: 8px 14px;

    border: 1px solid rgba(0, 229, 255, 0.28);
    border-radius: 10px;

    color: var(--cyan);

    background: rgba(0, 229, 255, 0.08);

    font-size: 11px;
    font-weight: 850;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.profile-customize-button:hover {
    border-color: rgba(0, 229, 255, 0.62);

    background: rgba(0, 229, 255, 0.15);

    transform: translateY(-1px);
}


/* =====================================================
 * Player Identity
 * ===================================================== */

.profile-player-main {
    display: flex;
    align-items: center;

    gap: clamp(25px, 4vw, 46px);
}


.profile-avatar-shell {
    position: relative;

    width: clamp(138px, 16vw, 178px);
    height: clamp(138px, 16vw, 178px);

    flex-shrink: 0;

    display: grid;
    place-items: center;
}


.profile-avatar-base {
    position: relative;

    width: 76%;
    height: 76%;

    overflow: hidden;

    display: grid;
    place-items: center;

    border: 3px solid rgba(0, 229, 255, 0.68);
    border-radius: 27%;

    background:
        linear-gradient(
            145deg,
            rgba(17, 27, 58, 0.98),
            rgba(7, 17, 38, 0.98)
        );

    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.46),
        0 0 28px rgba(0, 229, 255, 0.14);
}


.profile-avatar-image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


.profile-avatar-fallback {
    color: var(--cyan);

    font-size: clamp(34px, 5vw, 53px);
    font-weight: 950;

    letter-spacing: -2px;
}


.profile-avatar-frame {
    position: absolute;

    z-index: 3;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: contain;

    pointer-events: none;

    filter:
        drop-shadow(
            0 10px 22px rgba(0, 0, 0, 0.44)
        );
}


.profile-avatar-image[hidden],
.profile-avatar-frame[hidden],
.profile-player-badge[hidden],
.profile-player-badge img[hidden] {
    display: none !important;
}


.profile-player-identity {
    min-width: 0;

    flex: 1;
}


.profile-player-name-row {
    display: flex;
    align-items: center;

    gap: 13px;
}


.profile-player-name-row h2 {
    min-width: 0;

    overflow: hidden;

    color: var(--white);

    font-size: clamp(30px, 4.4vw, 46px);
    font-weight: 950;

    line-height: 1.15;

    text-overflow: ellipsis;
    white-space: nowrap;

    text-shadow:
        0 6px 25px rgba(0, 0, 0, 0.6);
}

.profile-change-username-button {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(25, 221, 255, 0.28);
    border-radius: 9px;
    color: var(--cyan);
    background: rgba(25, 221, 255, 0.07);
    font: inherit;
    cursor: pointer;
}

.profile-change-username-button:hover,
.profile-change-username-button:focus-visible {
    border-color: rgba(25, 221, 255, 0.65);
    color: #ffffff;
    background: rgba(25, 221, 255, 0.14);
}


.profile-player-badge {
    width: 43px;
    height: 43px;

    flex-shrink: 0;

    overflow: hidden;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;

    color: var(--gold);

    background: rgba(255, 215, 0, 0.09);

    box-shadow:
        0 0 18px rgba(255, 215, 0, 0.1);
}


.profile-player-badge img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}


.profile-player-title {
    margin-top: 8px;

    color: rgba(248, 250, 252, 0.76);

    font-size: 15px;
    font-weight: 700;
}


.profile-player-tags {
    margin-top: 17px;

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 9px;
}


.profile-player-rank,
.profile-player-level {
    min-height: 31px;

    padding: 5px 12px;

    display: inline-flex;
    align-items: center;

    border-radius: 9px;

    font-size: 11px;
    font-weight: 900;
}


.profile-player-rank {
    border: 1px solid rgba(139, 92, 246, 0.38);

    color: #c4b5fd;

    background: rgba(139, 92, 246, 0.16);
}


.profile-player-level {
    border: 1px solid rgba(0, 229, 255, 0.32);

    color: var(--cyan);

    background: rgba(0, 229, 255, 0.1);
}


.profile-account-meta {
    margin-top: 17px;

    display: flex;
    align-items: center;

    gap: 8px;

    color: var(--text-muted);

    font-size: 11px;
}


.profile-account-meta span + span::before {
    content: "•";

    margin-left: 8px;

    color: rgba(148, 163, 184, 0.55);
}


/* =====================================================
 * Player Card Footer
 * ===================================================== */

.profile-player-footer {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: end;

    gap: 20px;
}


.profile-player-progress {
    min-width: 0;
}


.profile-progress-header {
    margin-bottom: 8px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    color: rgba(248, 250, 252, 0.72);

    font-size: 11px;
}


.profile-progress-header strong {
    direction: ltr;

    color: var(--white);

    font-size: 11px;

    unicode-bidi: isolate;
}


.profile-progress-track {
    height: 12px;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;

    background: rgba(5, 12, 30, 0.72);

    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.34);
}


.profile-progress-fill {
    width: 0%;
    height: 100%;

    display: block;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--purple),
            var(--cyan)
        );

    box-shadow:
        0 0 14px rgba(0, 229, 255, 0.42);

    transition: width 0.75s ease;
}


.profile-player-wallet {
    min-width: 125px;

    padding: 10px 15px;

    border: 1px solid rgba(255, 215, 0, 0.21);
    border-radius: 13px;

    text-align: center;

    background: rgba(7, 17, 38, 0.58);
}


.profile-player-wallet > span {
    display: block;

    color: var(--text-muted);

    font-size: 9px;
}


.profile-player-wallet > div {
    margin-top: 2px;

    display: flex;
    align-items: baseline;
    justify-content: center;

    gap: 5px;

    direction: ltr;
}


.profile-player-wallet strong {
    color: var(--gold);

    font-size: 23px;
    font-weight: 950;
}


.profile-player-wallet small {
    color: rgba(255, 215, 0, 0.72);

    font-size: 10px;
    font-weight: 900;
}


/* =====================================================
 * Rank Summary Card
 * ===================================================== */

.profile-rank-card {
    min-width: 0;
    min-height: 360px;

    padding: 22px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;

    border: 1px solid rgba(139, 92, 246, 0.27);
    border-radius: 22px;

    text-align: center;

    background:
        radial-gradient(
            circle at top,
            rgba(139, 92, 246, 0.18),
            transparent 44%
        ),
        linear-gradient(
            180deg,
            rgba(17, 27, 58, 0.98),
            rgba(7, 17, 38, 0.98)
        );

    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.34);
}


.profile-rank-kicker {
    color: #c4b5fd;
}


.profile-rank-symbol {
    width: 84px;
    height: 84px;

    margin-top: 22px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(139, 92, 246, 0.34);
    border-radius: 24px;

    background: rgba(139, 92, 246, 0.12);

    font-size: 40px;

    box-shadow:
        0 0 30px rgba(139, 92, 246, 0.12);
}


.profile-rank-card h2 {
    margin-top: 17px;

    color: var(--white);

    font-size: 27px;
    font-weight: 900;
}


.profile-rank-card > p {
    max-width: 235px;

    margin-top: 7px;

    color: var(--text-muted);

    font-size: 11px;
    line-height: 1.8;
}


.profile-rank-next {
    width: 100%;

    margin-top: auto;
    padding-top: 24px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 13px;

    text-align: right;
}


.profile-rank-next div {
    min-width: 0;
}


.profile-rank-next div span {
    display: block;

    color: var(--text-muted);

    font-size: 9px;
}


.profile-rank-next strong {
    display: block;

    margin-top: 2px;

    overflow: hidden;

    color: var(--white);

    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.profile-rank-next > span {
    color: var(--cyan);

    font-size: 12px;
    font-weight: 900;
}


.profile-rank-progress-track {
    width: 100%;
    height: 9px;

    margin-top: 9px;

    overflow: hidden;

    border-radius: 999px;

    background: rgba(7, 17, 38, 0.75);
}


.profile-rank-progress-fill {
    height: 100%;

    display: block;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--purple),
            var(--cyan)
        );

    transition: width 0.7s ease;
}


.profile-ranks-button {
    width: 100%;
    min-height: 40px;

    margin-top: 18px;

    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;

    color: #c4b5fd;

    background: rgba(139, 92, 246, 0.1);

    font-size: 11px;
    font-weight: 850;

    cursor: pointer;
}


.profile-ranks-button:hover {
    border-color: rgba(139, 92, 246, 0.62);

    background: rgba(139, 92, 246, 0.18);
}


/* =====================================================
 * Dashboard and Tabs
 * ===================================================== */

.profile-dashboard {
    margin-top: 25px;

    overflow: hidden;

    border: 1px solid rgba(0, 229, 255, 0.11);
    border-radius: 21px;

    background: rgba(17, 27, 58, 0.58);

    box-shadow:
        0 17px 42px rgba(0, 0, 0, 0.25);
}


.profile-tabs {
    position: relative;

    padding: 10px;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    align-items: stretch;

    gap: 9px;

    border-bottom: 1px solid rgba(0, 229, 255, 0.1);

    background:
        linear-gradient(
            180deg,
            rgba(7, 17, 38, 0.92),
            rgba(7, 17, 38, 0.66)
        );
}


.profile-tab {
    position: relative;

    min-width: 0;
    min-height: 54px;

    padding: 10px 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    overflow: hidden;

    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;

    color: rgba(203, 213, 225, 0.76);

    background:
        linear-gradient(
            180deg,
            rgba(17, 27, 58, 0.62),
            rgba(7, 17, 38, 0.46)
        );

    font-size: 12px;
    font-weight: 850;

    cursor: pointer;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


.profile-tab::after {
    content: "";

    position: absolute;

    right: 18px;
    bottom: 0;
    left: 18px;

    height: 3px;

    border-radius:
        999px
        999px
        0
        0;

    background:
        linear-gradient(
            90deg,
            var(--purple),
            var(--cyan)
        );

    opacity: 0;

    transform: scaleX(0.35);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


.profile-tab:hover {
    color: var(--white);

    border-color: rgba(0, 229, 255, 0.24);

    background:
        linear-gradient(
            180deg,
            rgba(17, 40, 67, 0.82),
            rgba(7, 17, 38, 0.62)
        );

    transform: translateY(-1px);
}


.profile-tab:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}


.profile-tab.active {
    border-color: rgba(0, 229, 255, 0.52);

    color: var(--white);

    background:
        radial-gradient(
            circle at 50% 120%,
            rgba(0, 229, 255, 0.2),
            transparent 58%
        ),
        linear-gradient(
            180deg,
            rgba(0, 229, 255, 0.14),
            rgba(139, 92, 246, 0.09)
        );

    box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.08),
        0 9px 25px rgba(0, 229, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    transform: translateY(-1px);
}


.profile-tab.active::after {
    opacity: 1;

    transform: scaleX(1);
}


.profile-tab-icon {
    width: 28px;
    height: 28px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;

    color: rgba(203, 213, 225, 0.76);

    background: rgba(7, 17, 38, 0.48);

    font-size: 14px;
    font-weight: 950;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


.profile-tab.active
.profile-tab-icon {
    border-color: rgba(0, 229, 255, 0.34);

    color: var(--cyan);

    background: rgba(0, 229, 255, 0.1);

    box-shadow:
        0 0 16px rgba(0, 229, 255, 0.11);
}


.profile-tab-label {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.profile-tab-count {
    min-width: 23px;
    height: 22px;

    padding: 0 7px;

    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 999px;

    color: #ddd6fe;

    background: rgba(139, 92, 246, 0.25);

    font-size: 9px;
    font-weight: 900;

    direction: ltr;
    unicode-bidi: isolate;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}


.profile-tab.active
.profile-tab-count {
    border-color: rgba(0, 229, 255, 0.3);

    color: var(--white);

    background: rgba(0, 229, 255, 0.16);
}


.profile-tab-count-achievements {
    min-width: 42px;
}


.profile-tab-panel {
    padding: 26px;
}


.profile-tab-panel[hidden] {
    display: none !important;
}


.profile-tab-panel.active {
    animation:
        profile-panel-appear
        0.2s ease;
}


@keyframes profile-panel-appear {

    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

/* =====================================================
 * Section Headers
 * ===================================================== */

.profile-section-header {
    margin-bottom: 22px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;
}


.profile-section-header h2 {
    margin-top: 3px;

    color: var(--white);

    font-size: 23px;
    font-weight: 900;
}


.profile-section-header > p {
    max-width: 430px;

    color: var(--text-muted);

    font-size: 11px;

    text-align: left;
}


/* =====================================================
 * Statistics
 * ===================================================== */

.profile-statistics-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 13px;
}


.profile-stat-card {
    min-width: 0;

    padding: 16px;

    display: flex;
    align-items: center;

    gap: 13px;

    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 14px;

    background: rgba(7, 17, 38, 0.48);

    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}


.profile-stat-card:hover {
    border-color: rgba(0, 229, 255, 0.22);

    transform: translateY(-2px);
}


.profile-stat-icon {
    width: 43px;
    height: 43px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border: 1px solid rgba(0, 229, 255, 0.17);
    border-radius: 12px;

    background: rgba(0, 229, 255, 0.06);

    font-size: 20px;
}


.profile-stat-card > div {
    min-width: 0;
}


.profile-stat-card div span {
    display: block;

    color: var(--text-muted);

    font-size: 9px;
}


.profile-stat-card strong {
    display: block;

    margin-top: 2px;

    overflow: hidden;

    color: var(--white);

    font-size: 18px;
    font-weight: 900;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =====================================================
 * Overview Columns
 * ===================================================== */

.profile-overview-columns {
    margin-top: 18px;

    display: grid;

    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(0, 0.85fr);

    align-items: stretch;

    gap: 17px;
}


.profile-content-card {
    min-width: 0;

    padding: 20px;

    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 16px;

    background: rgba(7, 17, 38, 0.44);
}


.profile-content-card-header {
    margin-bottom: 17px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}


.profile-content-card-header h3 {
    margin-top: 3px;

    color: var(--white);

    font-size: 16px;
}


.profile-content-card-header button {
    min-height: 33px;

    padding: 6px 11px;

    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 8px;

    color: var(--cyan);

    background: rgba(0, 229, 255, 0.06);

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;
}


.profile-equipped-items {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;
}


.profile-equipped-slot {
    min-width: 0;

    padding: 12px;

    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 11px;

    background: rgba(17, 27, 58, 0.48);
}


.profile-equipped-slot span {
    display: block;

    color: var(--text-muted);

    font-size: 9px;
}


.profile-equipped-slot strong {
    display: block;

    margin-top: 4px;

    overflow: hidden;

    color: var(--white);

    font-size: 11px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.profile-recent-activity {
    min-height: 200px;
}


/* =====================================================
 * Empty and Loading States
 * ===================================================== */

.profile-empty-state {
    min-height: 250px;

    padding: 30px 20px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    border: 1px dashed rgba(0, 229, 255, 0.19);
    border-radius: 15px;

    text-align: center;

    background: rgba(7, 17, 38, 0.34);
}


.profile-empty-state.compact {
    min-height: 190px;
}


.profile-empty-state > span {
    width: 57px;
    height: 57px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(0, 229, 255, 0.17);
    border-radius: 16px;

    background: rgba(0, 229, 255, 0.06);

    font-size: 25px;
}


.profile-empty-state strong {
    margin-top: 13px;

    color: var(--white);

    font-size: 14px;
}


.profile-empty-state p {
    max-width: 330px;

    margin-top: 5px;

    color: var(--text-muted);

    font-size: 11px;
    line-height: 1.75;
}


.profile-empty-state a {
    min-height: 37px;

    margin-top: 15px;
    padding: 7px 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 9px;

    color: var(--cyan);

    background: rgba(0, 229, 255, 0.07);

    font-size: 11px;
    font-weight: 800;

    text-decoration: none;
}


.profile-loading-state {
    min-height: 250px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 13px;

    color: var(--text-muted);

    font-size: 11px;
}


.profile-loading-state[hidden] {
    display: none !important;
}


.profile-loading-spinner {
    width: 34px;
    height: 34px;

    display: block;

    border: 3px solid rgba(0, 229, 255, 0.14);
    border-top-color: var(--cyan);
    border-radius: 50%;

    animation:
        profile-loading-spin
        0.75s linear infinite;
}


@keyframes profile-loading-spin {

    to {
        transform: rotate(360deg);
    }

}


/* =====================================================
 * Inventory
 * ===================================================== */

.profile-inventory-summary,
.profile-achievements-summary {
    display: flex;
    align-items: center;

    gap: 10px;
}


.profile-inventory-summary {
    padding: 9px 13px;

    border: 1px solid rgba(0, 229, 255, 0.17);
    border-radius: 10px;

    background: rgba(0, 229, 255, 0.055);
}


.profile-inventory-summary span {
    color: var(--text-muted);

    font-size: 9px;
}


.profile-inventory-summary strong {
    color: var(--cyan);

    font-size: 17px;
}


.profile-inventory-filters {
    margin-bottom: 19px;

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;
}


.profile-inventory-filter {
    min-height: 35px;

    padding: 7px 13px;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;

    color: var(--text-muted);

    background: rgba(7, 17, 38, 0.44);

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;
}


.profile-inventory-filter:hover {
    color: var(--white);

    border-color: rgba(0, 229, 255, 0.2);
}


.profile-inventory-filter.active {
    border-color: rgba(0, 229, 255, 0.35);

    color: var(--cyan);

    background: rgba(0, 229, 255, 0.1);
}


.profile-inventory-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;
}


.profile-inventory-grid[hidden] {
    display: none !important;
}


/* العناصر التي سينشئها profilePage.js */

.profile-inventory-item {
    min-width: 0;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 15px;

    background: rgba(7, 17, 38, 0.52);

    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.profile-inventory-item:hover {
    border-color: rgba(0, 229, 255, 0.25);

    transform: translateY(-3px);

    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.25);
}


.profile-inventory-item.equipped {
    border-color: rgba(0, 229, 255, 0.52);

    box-shadow:
        0 0 22px rgba(0, 229, 255, 0.08);
}


.profile-inventory-preview {
    position: relative;

    aspect-ratio: 16 / 11;

    overflow: hidden;

    display: grid;
    place-items: center;

    background:
        radial-gradient(
            circle at center,
            rgba(0, 229, 255, 0.1),
            transparent 64%
        ),
        #0a1530;
}


.profile-inventory-preview img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


.profile-inventory-preview-fallback {
    color: var(--cyan);

    font-size: 34px;
    font-weight: 900;
}


.profile-inventory-equipped-label {
    position: absolute;

    top: 9px;
    right: 9px;

    padding: 4px 8px;

    border: 1px solid rgba(0, 229, 255, 0.37);
    border-radius: 999px;

    color: var(--cyan);

    background: rgba(7, 17, 38, 0.86);

    font-size: 8px;
    font-weight: 900;
}


.profile-inventory-item-content {
    padding: 13px;
}


.profile-inventory-item-name {
    overflow: hidden;

    color: var(--white);

    font-size: 12px;
    font-weight: 900;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.profile-inventory-item-meta {
    margin-top: 7px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;
}


.profile-item-rarity {
    font-size: 9px;
    font-weight: 800;
}


.profile-item-rarity.common {
    color: #cbd5e1;
}


.profile-item-rarity.rare {
    color: #60a5fa;
}


.profile-item-rarity.epic {
    color: #c084fc;
}


.profile-item-rarity.legendary {
    color: var(--gold);
}


.profile-inventory-equip-button {
    width: 100%;
    min-height: 34px;

    margin-top: 11px;

    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;

    color: #ddd6fe;

    background: rgba(139, 92, 246, 0.1);

    font-size: 9px;
    font-weight: 900;

    cursor: pointer;
}


.profile-inventory-equip-button:hover:not(:disabled) {
    border-color: rgba(139, 92, 246, 0.62);

    background: rgba(139, 92, 246, 0.2);
}


.profile-inventory-equip-button:disabled {
    color: var(--cyan);

    border-color: rgba(0, 229, 255, 0.25);

    background: rgba(0, 229, 255, 0.07);

    cursor: default;
}


/* =====================================================
 * Achievements and Medals
 * ===================================================== */

.profile-achievements-summary {
    gap: 9px;
}


.profile-achievements-summary > div {
    min-width: 85px;

    padding: 8px 12px;

    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;

    text-align: center;

    background: rgba(7, 17, 38, 0.45);
}


.profile-achievements-summary span {
    display: block;

    color: var(--text-muted);

    font-size: 8px;
}


.profile-achievements-summary strong {
    display: block;

    margin-top: 2px;

    color: var(--white);

    font-size: 16px;
}


.profile-medals-section,
.profile-achievements-section {
    padding: 20px;

    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 16px;

    background: rgba(7, 17, 38, 0.42);
}


.profile-achievements-section {
    margin-top: 17px;
}


.profile-medals-section > header,
.profile-achievements-section > header {
    margin-bottom: 17px;
}


.profile-medals-section h3,
.profile-achievements-section h3 {
    color: var(--white);

    font-size: 16px;
}


.profile-medals-section header p,
.profile-achievements-section header p {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: 10px;
}


.profile-medals-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;
}


.profile-achievements-grid {
    display: block;
}


.profile-achievements-grid[hidden] {
    display: none !important;
}


.profile-achievement-group {
    min-width: 0;
}


.profile-achievement-group +
.profile-achievement-group {
    margin-top: 28px;
    padding-top: 26px;

    border-top:
        1px solid
        rgba(148, 163, 184, 0.1);
}


.profile-achievement-group-header {
    margin-bottom: 13px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
}


.profile-achievement-group-identity {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 11px;
}


.profile-achievement-group-icon {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            rgba(0, 229, 255, 0.09),
            rgba(139, 92, 246, 0.07)
        );

    font-size: 18px;

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, 0.035);
}


.profile-achievement-group-header h4 {
    color: var(--white);

    font-size: 14px;
    font-weight: 900;
}


.profile-achievement-group-header p {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 9px;
    line-height: 1.55;
}


.profile-achievement-group-count {
    min-width: 48px;
    height: 27px;

    padding: 0 9px;

    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 999px;

    color: var(--cyan);

    background: rgba(0, 229, 255, 0.07);

    font-size: 10px;
    font-weight: 900;

    direction: ltr;
    unicode-bidi: isolate;
}


.profile-achievement-group-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 11px;
}


/* العناصر التي سينشئها JavaScript */

.profile-medal-card {
    min-width: 0;
    min-height: 205px;

    padding: 15px 12px 12px;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    border: 1px solid rgba(255, 215, 0, 0.13);
    border-radius: 13px;

    text-align: center;

    background:
        linear-gradient(
            180deg,
            rgba(255, 215, 0, 0.055),
            rgba(17, 27, 58, 0.46)
        );

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.profile-medal-card:hover {
    border-color: rgba(255, 215, 0, 0.28);

    background:
        linear-gradient(
            180deg,
            rgba(255, 215, 0, 0.085),
            rgba(17, 36, 62, 0.56)
        );

    transform: translateY(-2px);
}


.profile-medal-card-icon {
    position: relative;

    width: 64px;
    height: 64px;

    margin: 0 auto;

    overflow: hidden;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255, 215, 0, 0.16);
    border-radius: 17px;

    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(255, 215, 0, 0.15),
            rgba(255, 215, 0, 0.045)
        );

    font-size: 25px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 8px 22px rgba(0, 0, 0, 0.24);
}


.profile-medal-card-image,
.profile-achievement-image,
.profile-achievement-visual-fallback {
    grid-area: 1 / 1;
}


.profile-medal-card-image,
.profile-achievement-image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;
    object-position: center;
}


.profile-medal-card-image {
    padding: 4px;
}


.profile-achievement-image[hidden],
.profile-medal-card-image[hidden],
.profile-achievement-visual-fallback[hidden] {
    display: none !important;
}


.profile-achievement-visual-fallback {
    display: grid;
    place-items: center;

    line-height: 1;
}


.profile-medal-card-image.is-loading,
.profile-achievement-image.is-loading {
    visibility: hidden;
}


.profile-medal-card-content {
    min-width: 0;

    display: flex;
    flex: 1;
    flex-direction: column;
}


.profile-medal-card-name {
    display: block;

    margin-top: 10px;

    overflow: hidden;

    color: var(--white);

    font-size: 11px;
    font-weight: 900;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.profile-medal-card-reason {
    margin-top: 10px;
    padding: 9px 10px;

    flex: 1;

    border: 1px solid rgba(0, 229, 255, 0.13);
    border-radius: 10px;

    text-align: right;

    background:
        rgba(7, 17, 38, 0.55);

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, 0.025);
}


.profile-medal-card-reason > span {
    display: block;

    color: var(--cyan);

    font-size: 8px;
    font-weight: 900;

    letter-spacing: 0.3px;
}


.profile-medal-card-reason > p {
    margin-top: 4px;

    color: rgba(226, 232, 240, 0.78);

    font-size: 9px;
    line-height: 1.65;
}


.profile-achievement-card {
    min-width: 0;
    min-height: 122px;

    padding: 12px;

    display: grid;

    grid-template-columns:
        auto
        minmax(0, 1fr);

    align-items: start;

    gap: 10px;

    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 13px;

    background: rgba(17, 27, 58, 0.5);

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.profile-achievement-card:hover {
    border-color: rgba(0, 229, 255, 0.19);

    background: rgba(17, 36, 62, 0.62);

    transform: translateY(-1px);
}


.profile-achievement-card.completed {
    border-color: rgba(0, 229, 255, 0.28);

    background: rgba(0, 229, 255, 0.04);
}


.profile-achievement-icon {
    position: relative;

    width: 48px;
    height: 48px;

    overflow: hidden;

    display: grid;
    place-items: center;

    border: 1px solid rgba(139, 92, 246, 0.24);
    border-radius: 15px;

    background:
        radial-gradient(
            circle at 50% 34%,
            rgba(139, 92, 246, 0.18),
            rgba(139, 92, 246, 0.055)
        );

    font-size: 22px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}


.profile-achievement-image {
    padding: 3px;
}


.profile-achievement-icon.locked
.profile-achievement-image {
    opacity: 0.34;

    filter:
        grayscale(1)
        brightness(0.68);
}


.profile-achievement-image-lock {
    position: absolute;

    z-index: 2;

    right: 4px;
    bottom: 4px;

    width: 22px;
    height: 22px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;

    background: rgba(5, 12, 30, 0.88);

    font-size: 11px;

    box-shadow:
        0 5px 12px rgba(0, 0, 0, 0.34);
}


.profile-achievement-content {
    min-width: 0;
}


.profile-achievement-title {
    overflow: hidden;

    color: var(--white);

    font-size: 11px;
    font-weight: 900;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.profile-achievement-description {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 8px;
    line-height: 1.55;
}


.profile-achievement-progress {
    height: 6px;

    margin-top: 8px;

    overflow: hidden;

    border-radius: 999px;

    background: rgba(7, 17, 38, 0.8);
}


.profile-achievement-progress span {
    height: 100%;

    display: block;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--purple),
            var(--cyan)
        );
}


/* =====================================================
 * Compact Ranks Panel
 * =====================================================
 *
 * نافذة رتب صغيرة شبيهة بلوحة الإشعارات:
 * - لا تعتيم ولا ضبابية خلف الصفحة.
 * - تظهر أعلى يمين الصفحة.
 * - تمرير داخلي لقائمة الرتب.
 */

.profile-dialog {
    position: fixed;

    z-index: 500;

    top: 88px;
    right: 18px;
    bottom: auto;
    left: auto;

    width: min(390px, calc(100vw - 30px));
    max-width: 390px;
    max-height: 520px;

    margin: 0;
    padding: 0;

    overflow: visible;

    border: 0;

    color: var(--white);

    background: transparent;
}


.profile-dialog::backdrop {
    background: transparent;

    backdrop-filter: none;

    -webkit-backdrop-filter: none;
}


.profile-dialog[open] {
    animation:
        profile-ranks-panel-open
        0.18s ease;
}


.profile-dialog-card {
    position: relative;

    width: 100%;
    max-height: 520px;

    padding: 21px 18px 17px;

    overflow: hidden;

    display: flex;
    flex-direction: column;

    border: 1px solid rgba(0, 229, 255, 0.22);
    border-radius: 17px;

    background:
        radial-gradient(
            circle at top right,
            rgba(139, 92, 246, 0.13),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            rgba(17, 27, 58, 0.99),
            rgba(7, 17, 38, 0.99)
        );

    box-shadow:
        0 24px 58px rgba(0, 0, 0, 0.48),
        0 0 26px rgba(0, 229, 255, 0.06);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);
}


.profile-dialog-close {
    position: absolute;

    z-index: 3;

    top: 12px;
    left: 12px;

    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    padding: 0;

    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;

    color: #cbd5e1;

    background: rgba(15, 23, 42, 0.68);

    font-size: 21px;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.profile-dialog-close:hover {
    border-color: rgba(0, 229, 255, 0.4);

    color: var(--cyan);

    background: rgba(0, 229, 255, 0.09);

    transform: scale(1.04);
}


.profile-dialog-card > header {
    flex-shrink: 0;

    padding-left: 42px;
}


.profile-dialog-card header h2 {
    margin-top: 3px;

    color: var(--white);

    font-size: 21px;
}


.profile-dialog-card header p {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: 10px;
    line-height: 1.65;
}


.profile-ranks-list {
    min-height: 0;
    max-height: 360px;

    margin-top: 16px;
    padding-left: 3px;

    overflow-y: auto;
    overscroll-behavior: contain;

    display: flex;
    flex-direction: column;

    gap: 8px;

    scrollbar-width: thin;

    scrollbar-color:
        rgba(0, 229, 255, 0.28)
        transparent;
}


.profile-ranks-list::-webkit-scrollbar {
    width: 6px;
}


.profile-ranks-list::-webkit-scrollbar-track {
    background: transparent;
}


.profile-ranks-list::-webkit-scrollbar-thumb {
    border-radius: 999px;

    background: rgba(0, 229, 255, 0.26);
}


.profile-rank-list-item {
    flex-shrink: 0;

    padding: 10px 11px;

    display: flex;
    align-items: center;

    gap: 10px;

    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 11px;

    background: rgba(7, 17, 38, 0.48);

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}


.profile-rank-list-item:hover {
    border-color: rgba(139, 92, 246, 0.24);

    background: rgba(139, 92, 246, 0.06);
}


.profile-rank-list-item.active {
    border-color: rgba(0, 229, 255, 0.37);

    background: rgba(0, 229, 255, 0.08);
}


.profile-rank-list-item > span {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: rgba(139, 92, 246, 0.1);

    font-size: 18px;
}


.profile-rank-list-item strong {
    display: block;

    color: var(--white);

    font-size: 11px;
}


.profile-rank-list-item small {
    display: block;

    margin-top: 2px;

    color: var(--text-muted);

    font-size: 8px;
}


@keyframes profile-ranks-panel-open {

    from {
        opacity: 0;

        transform:
            translateY(-7px)
            scale(0.98);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}


@media (max-width: 620px) {

    .profile-dialog {
        top: 74px;
        right: 11px;
        left: 11px;

        width: auto;
        max-width: none;
        max-height: calc(100vh - 88px);
    }


    .profile-dialog-card {
        max-height: calc(100vh - 88px);

        padding:
            20px
            15px
            15px;
    }


    .profile-ranks-list {
        max-height: calc(100vh - 225px);
    }

}


/* =====================================================
 * Rarity and Theme Enhancements
 * ===================================================== */

.profile-player-card[data-theme-rarity="rare"] {
    border-color: rgba(96, 165, 250, 0.36);
}


.profile-player-card[data-theme-rarity="epic"] {
    border-color: rgba(192, 132, 252, 0.4);
}


.profile-player-card[data-theme-rarity="legendary"] {
    border-color: rgba(255, 215, 0, 0.46);

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.44),
        0 0 30px rgba(255, 215, 0, 0.08);
}


/* =====================================================
 * Responsive
 * ===================================================== */

@media (max-width: 1050px) {

    .profile-showcase {
        grid-template-columns:
            minmax(0, 1fr)
            270px;
    }


    .profile-inventory-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }


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


    .profile-medals-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 1100px) {

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

}


@media (max-width: 850px) {

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


    .profile-rank-card {
        min-height: 310px;
    }


    .profile-rank-next {
        margin-top: 22px;
    }


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


    .profile-achievement-group-grid {
        grid-template-columns:
            1fr;
    }


    .profile-achievement-group-header {
        align-items: flex-start;
    }

}


@media (max-width: 700px) {

    .profile-page-header {
        grid-template-columns:
            1fr;

        align-items: stretch;

        gap: 12px;
    }


    .profile-page-title-row {
        justify-content: center;
    }


    .profile-page-description {
        text-align: center;
    }


    .profile-store-link {
        width: 100%;
    }


    .profile-player-card,
    .profile-player-content {
        min-height: 0;
    }


    .profile-player-content {
        padding: 23px;
    }


    .profile-player-main {
        flex-direction: column;

        text-align: center;
    }


    .profile-player-name-row,
    .profile-player-tags,
    .profile-account-meta {
        justify-content: center;
    }


    .profile-player-footer {
        grid-template-columns:
            1fr;
    }


    .profile-player-wallet {
        width: 100%;
    }


    .profile-tabs {
        display: flex;

        overflow-x: auto;

        justify-content: flex-start;

        scrollbar-width: thin;
        scroll-snap-type: x proximity;
    }


    .profile-tab {
        min-width: 165px;

        flex-shrink: 0;

        scroll-snap-align: start;
    }


    .profile-tab-panel {
        padding: 20px;
    }


    .profile-section-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .profile-section-header > p {
        text-align: right;
    }


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


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

}


@media (max-width: 700px) {

    .profile-player-skeleton {
        inset: 23px;
    }

    .profile-player-skeleton-main {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .profile-player-skeleton-lines {
        width: min(320px, 88%);
        justify-items: center;
    }

    .profile-player-skeleton-lines span:first-child {
        width: 82%;
    }

    .profile-player-skeleton-lines span:nth-child(2) {
        width: 52%;
    }

    .profile-player-skeleton-lines span:last-child {
        width: 64%;
    }

    .profile-player-skeleton-footer {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 480px) {

    .profile-medal-card {
        min-height: 190px;
    }


    .profile-medal-card-reason {
        padding:
            8px
            9px;
    }


    .profile-page {
        padding-top: 20px;
    }


    .profile-player-content {
        padding: 19px;
    }


    .profile-player-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .profile-customize-button {
        width: 100%;
    }


    .profile-avatar-shell {
        width: 145px;
        height: 145px;
    }


    .profile-player-name-row h2 {
        max-width: 245px;

        font-size: 28px;
    }


    .profile-progress-header {
        align-items: flex-start;
        flex-direction: column;

        gap: 4px;
    }


    .profile-statistics-grid,
    .profile-equipped-items,
    .profile-inventory-grid,
    .profile-medals-grid {
        grid-template-columns:
            1fr;
    }


    .profile-tab {
        min-width: 150px;

        padding-inline:
            12px;
    }


    .profile-tab-panel {
        padding: 16px;
    }


    .profile-inventory-filters {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .profile-inventory-filter {
        width: 100%;
    }


    .profile-achievements-summary {
        width: 100%;
    }


    .profile-achievements-summary > div {
        flex: 1;
    }

}

/* =====================================================
 * Rank Images v1.0
 * ===================================================== */

.profile-rank-symbol {
    width: 118px;
    height: 118px;

    overflow: visible;

    border-color:
        color-mix(
            in srgb,
            var(--rank-color, #8b5cf6) 48%,
            transparent
        );

    background:
        radial-gradient(
            circle,
            color-mix(
                in srgb,
                var(--rank-color, #8b5cf6) 17%,
                transparent
            ),
            transparent 68%
        );

    font-size: 0;

    box-shadow:
        0 0 34px
        color-mix(
            in srgb,
            var(--rank-color, #8b5cf6) 18%,
            transparent
        );
}


.profile-rank-symbol-image {
    width: 118px;
    height: 118px;

    display: block;

    object-fit: contain;

    filter:
        drop-shadow(
            0 10px 17px
            rgba(0, 0, 0, 0.30)
        );
}


.profile-rank-symbol-fallback {
    display: grid;
    place-items: center;

    width: 70px;
    height: 70px;

    border-radius: 21px;

    background:
        color-mix(
            in srgb,
            var(--rank-color, #8b5cf6) 18%,
            transparent
        );

    color:
        var(--rank-color, #c4b5fd);

    font-size: 34px;
    font-weight: 950;
}


.profile-rank-list-item {
    --rank-color:
        #8a8a8a;
}


.profile-rank-list-item.active {
    border-color:
        color-mix(
            in srgb,
            var(--rank-color, #00e5ff) 52%,
            transparent
        );
}


.profile-rank-list-item > .profile-rank-list-icon {
    width: 50px;
    height: 50px;

    overflow: visible;

    border:
        1px solid
        color-mix(
            in srgb,
            var(--rank-color, #8b5cf6) 28%,
            transparent
        );

    background:
        radial-gradient(
            circle,
            color-mix(
                in srgb,
                var(--rank-color, #8b5cf6) 13%,
                transparent
            ),
            transparent 72%
        );

    font-size: 0;
}


.profile-rank-list-image {
    width: 48px;
    height: 48px;

    display: block;

    object-fit: contain;

    filter:
        drop-shadow(
            0 5px 8px
            rgba(0, 0, 0, 0.26)
        );
}


.profile-rank-list-fallback {
    display: grid;
    place-items: center;

    width: 32px;
    height: 32px;

    border-radius: 9px;

    color:
        var(--rank-color, #c4b5fd);

    font-size: 16px;
    font-weight: 950;
}


@supports not (
    color:
        color-mix(
            in srgb,
            white 50%,
            black
        )
) {

    .profile-rank-symbol,
    .profile-rank-list-item > .profile-rank-list-icon {
        border-color:
            rgba(139, 92, 246, 0.34);

        background:
            rgba(139, 92, 246, 0.10);
    }

}


@media (max-width: 600px) {

    .profile-rank-symbol,
    .profile-rank-symbol-image {
        width: 104px;
        height: 104px;
    }

}


@media (prefers-reduced-motion: reduce) {
    .profile-player-skeleton-top::after,
    .profile-player-skeleton-avatar::after,
    .profile-player-skeleton-lines span::after,
    .profile-player-skeleton-footer span::after {
        animation: none;
    }
}

/* =====================================================
 * Profile UI Polish Phase 2 — Overview + Inventory v2
 * ===================================================== */

.profile-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


.profile-stat-card {
    position: relative;
    min-height: 82px;
    overflow: hidden;
}


.profile-stat-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 3px;
    background: rgba(0, 229, 255, 0.48);
}


.profile-stat-card[data-stat="wins"]::before,
.profile-stat-card[data-stat="achievements"]::before {
    background: rgba(250, 204, 21, 0.72);
}


.profile-stat-card[data-stat="playtime"]::before {
    background: rgba(139, 92, 246, 0.72);
}


.profile-stat-card[data-stat="items"]::before {
    background: rgba(34, 197, 94, 0.65);
}


.profile-stat-card[data-stat="wins"] .profile-stat-icon,
.profile-stat-card[data-stat="achievements"] .profile-stat-icon {
    border-color: rgba(250, 204, 21, 0.2);
    background: rgba(250, 204, 21, 0.07);
}


.profile-stat-card[data-stat="playtime"] .profile-stat-icon {
    border-color: rgba(139, 92, 246, 0.22);
    background: rgba(139, 92, 246, 0.08);
}


.profile-stat-card[data-stat="items"] .profile-stat-icon {
    border-color: rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.07);
}


.profile-stat-card strong {
    font-size: clamp(18px, 2.2vw, 22px);
}


.profile-equipped-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


.profile-equipped-slot {
    position: relative;
    min-height: 66px;
    padding: 12px 12px 12px 46px;
    overflow: hidden;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}


[dir="rtl"] .profile-equipped-slot {
    padding: 12px 46px 12px 12px;
}


.profile-equipped-slot::before {
    position: absolute;
    inset-inline-start: 11px;
    top: 50%;
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(0, 229, 255, 0.13);
    border-radius: 8px;
    background: rgba(0, 229, 255, 0.055);
    transform: translateY(-50%);
    font-size: 13px;
}


.profile-equipped-slot[data-equipped-slot="avatar"]::before { content: "👤"; }
.profile-equipped-slot[data-equipped-slot="avatarFrame"]::before { content: "🖼️"; }
.profile-equipped-slot[data-equipped-slot="profileBackground"]::before { content: "🌌"; }
.profile-equipped-slot[data-equipped-slot="title"]::before { content: "🏷️"; }
.profile-equipped-slot[data-equipped-slot="badge"]::before { content: "⭐"; }
.profile-equipped-slot[data-equipped-slot="profileTheme"]::before { content: "🎨"; }


.profile-equipped-slot[data-state="customized"] {
    border-color: rgba(0, 229, 255, 0.16);
    background: rgba(0, 229, 255, 0.045);
}


.profile-equipped-slot[data-state="customized"]::after {
    content: "";
    position: absolute;
    inset-block: 8px;
    inset-inline-end: 0;
    width: 2px;
    border-radius: 999px;
    background: var(--cyan);
    opacity: 0.55;
}


.profile-equipped-slot[data-rarity="rare"] { border-color: rgba(96, 165, 250, 0.18); }
.profile-equipped-slot[data-rarity="epic"] { border-color: rgba(192, 132, 252, 0.2); }
.profile-equipped-slot[data-rarity="legendary"] { border-color: rgba(250, 204, 21, 0.22); }


.profile-recent-card .profile-recent-activity {
    min-height: 0;
}


.profile-recent-activity .profile-achievement-card {
    min-height: 0;
    padding: 10px 11px;
    gap: 10px;
    border-radius: 11px;
    background: rgba(17, 27, 58, 0.38);
}


.profile-recent-activity .profile-achievement-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    font-size: 17px;
}


.profile-recent-activity .profile-achievement-title {
    font-size: 10px;
}


.profile-recent-activity .profile-achievement-description {
    margin-top: 2px;
    font-size: 8px;
}


.profile-inventory-skeleton[hidden] {
    display: none !important;
}


.profile-inventory-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}


.profile-inventory-skeleton-card {
    overflow: hidden;
    min-height: 235px;
    padding: 0 13px 13px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 15px;
    background: rgba(7, 17, 38, 0.48);
}


.profile-inventory-skeleton-card > span,
.profile-inventory-skeleton-card > i,
.profile-inventory-skeleton-card > b {
    position: relative;
    overflow: hidden;
    display: block;
    background: rgba(148, 163, 184, 0.1);
}


.profile-inventory-skeleton-card > span {
    width: calc(100% + 26px);
    aspect-ratio: 16 / 11;
    margin-inline: -13px;
    margin-bottom: 13px;
}


.profile-inventory-skeleton-card > i {
    width: 70%;
    height: 12px;
    border-radius: 999px;
}


.profile-inventory-skeleton-card > b {
    width: 100%;
    height: 34px;
    margin-top: 20px;
    border-radius: 8px;
}


.profile-inventory-skeleton-card > span::after,
.profile-inventory-skeleton-card > i::after,
.profile-inventory-skeleton-card > b::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    animation: profile-inventory-skeleton-shimmer 1.55s ease-in-out infinite;
}


@keyframes profile-inventory-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}


.profile-inventory-item {
    position: relative;
}


.profile-inventory-item::before {
    content: "";
    position: absolute;
    z-index: 3;
    inset-inline: 0;
    top: 0;
    height: 3px;
    background: rgba(203, 213, 225, 0.42);
}


.profile-inventory-item[data-rarity="rare"]::before { background: #60a5fa; }
.profile-inventory-item[data-rarity="epic"]::before { background: #c084fc; }
.profile-inventory-item[data-rarity="legendary"]::before { background: var(--gold); }
.profile-inventory-item[data-rarity="mythic"]::before,
.profile-inventory-item[data-rarity="exclusive"]::before {
    background: linear-gradient(90deg, #c084fc, var(--cyan), var(--gold));
}


.profile-inventory-item[data-equipped="true"] {
    border-color: rgba(34, 197, 94, 0.38);
    box-shadow: 0 0 22px rgba(34, 197, 94, 0.07);
}


.profile-inventory-preview img {
    transition: transform 0.24s ease, filter 0.24s ease;
}


.profile-inventory-item:hover .profile-inventory-preview img {
    transform: scale(1.035);
    filter: brightness(1.04);
}


.profile-inventory-type-badge {
    position: absolute;
    z-index: 2;
    inset-inline-start: 9px;
    bottom: 9px;
    max-width: calc(100% - 18px);
    padding: 4px 7px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: rgba(226, 232, 240, 0.92);
    background: rgba(4, 10, 25, 0.78);
    backdrop-filter: blur(7px);
    font-size: 8px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.profile-inventory-equipped-label {
    border-color: rgba(34, 197, 94, 0.34);
    color: #bbf7d0;
    background: rgba(7, 35, 25, 0.86);
}


.profile-inventory-item-meta > span:first-child {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.profile-inventory-equip-button[data-action="equip"] {
    border-color: rgba(139, 92, 246, 0.34);
    color: #ede9fe;
    background: rgba(139, 92, 246, 0.12);
}


.profile-inventory-equip-button[data-action="equipped"] {
    border-color: rgba(34, 197, 94, 0.25);
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.08);
}


@media (max-width: 1050px) {
    .profile-equipped-items,
    .profile-inventory-skeleton-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


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

    .profile-stat-card {
        min-height: 74px;
        padding: 13px;
        gap: 10px;
    }

    .profile-stat-icon {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    .profile-equipped-items,
    .profile-inventory-skeleton-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-inventory-filters {
        margin-inline: -20px;
        padding-inline: 20px;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        overscroll-behavior-inline: contain;
    }

    .profile-inventory-filters::-webkit-scrollbar {
        display: none;
    }

    .profile-inventory-filter {
        width: auto;
        min-width: max-content;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
}


@media (max-width: 480px) {
    .profile-statistics-grid,
    .profile-equipped-items,
    .profile-inventory-grid,
    .profile-inventory-skeleton-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-equipped-slot {
        min-height: 64px;
    }

    .profile-inventory-item-content {
        padding: 11px;
    }

    .profile-inventory-item-name {
        font-size: 11px;
    }

    .profile-inventory-preview {
        aspect-ratio: 4 / 3;
    }
}


@media (max-width: 365px) {
    .profile-statistics-grid,
    .profile-inventory-grid,
    .profile-inventory-skeleton-grid {
        grid-template-columns: 1fr;
    }
}


@media (prefers-reduced-motion: reduce) {
    .profile-inventory-skeleton-card > span::after,
    .profile-inventory-skeleton-card > i::after,
    .profile-inventory-skeleton-card > b::after {
        animation: none;
    }

    .profile-inventory-preview img,
    .profile-inventory-item,
    .profile-equipped-slot,
    .profile-stat-card {
        transition: none;
    }
}

/* =====================================================
 * Profile UI Polish Phase 3 — Achievements + Medals
 * ===================================================== */

.profile-achievements-summary-wrap {
    min-width: 190px;
    display: grid;
    gap: 7px;
}

.profile-achievements-overall-progress {
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(7, 17, 38, 0.86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.profile-achievements-overall-progress > span {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.18);
    transition: width 0.28s ease;
}

.profile-achievement-group-nav {
    margin: 0 0 17px;
    padding: 2px 1px 7px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
}

.profile-achievement-group-nav[hidden] {
    display: none !important;
}

.profile-achievement-group-nav::-webkit-scrollbar {
    display: none;
}

.profile-achievement-group-link {
    min-height: 38px;
    padding: 7px 10px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 11px;
    color: rgba(226, 232, 240, 0.86);
    background: rgba(7, 17, 38, 0.58);
    font-size: 9px;
    font-weight: 800;
    text-decoration: none;
    scroll-snap-align: start;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.profile-achievement-group-link:hover,
.profile-achievement-group-link:focus-visible {
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--white);
    background: rgba(0, 229, 255, 0.075);
    transform: translateY(-1px);
}

.profile-achievement-group-link:focus-visible {
    outline: 2px solid rgba(0, 229, 255, 0.42);
    outline-offset: 2px;
}

.profile-achievement-group-link-icon {
    font-size: 15px;
    line-height: 1;
}

.profile-achievement-group-link-label {
    white-space: nowrap;
}

.profile-achievement-group-link small {
    min-width: 34px;
    padding: 3px 6px;
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(0, 229, 255, 0.07);
    font-size: 8px;
    font-weight: 900;
    text-align: center;
    direction: ltr;
    unicode-bidi: isolate;
}

.profile-achievement-group {
    scroll-margin-top: 92px;
}

.profile-achievements-skeleton {
    display: grid;
    gap: 13px;
}

.profile-achievements-skeleton[hidden] {
    display: none !important;
}

.profile-achievements-skeleton-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-achievements-skeleton-header span {
    position: relative;
    overflow: hidden;
    display: block;
    height: 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
}

.profile-achievements-skeleton-header span:first-child {
    width: 150px;
}

.profile-achievements-skeleton-header span:last-child {
    width: 54px;
}

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

.profile-achievements-skeleton-card {
    position: relative;
    min-height: 122px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 13px;
    background:
        linear-gradient(
            110deg,
            rgba(148, 163, 184, 0.035) 8%,
            rgba(148, 163, 184, 0.09) 18%,
            rgba(148, 163, 184, 0.035) 33%
        );
    background-size: 220% 100%;
    animation: profile-achievements-skeleton-shimmer 1.35s linear infinite;
}

.profile-achievements-skeleton-card::before {
    content: "";
    position: absolute;
    top: 14px;
    inset-inline-start: 13px;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: rgba(139, 92, 246, 0.08);
}

.profile-achievements-skeleton-card::after {
    content: "";
    position: absolute;
    top: 17px;
    inset-inline-start: 73px;
    width: calc(100% - 92px);
    height: 70px;
    border-radius: 9px;
    background:
        linear-gradient(
            180deg,
            rgba(226, 232, 240, 0.08) 0 10px,
            transparent 10px 19px,
            rgba(148, 163, 184, 0.065) 19px 28px,
            transparent 28px 44px,
            rgba(0, 229, 255, 0.06) 44px 50px,
            transparent 50px
        );
}

@keyframes profile-achievements-skeleton-shimmer {
    to {
        background-position: -220% 0;
    }
}

.profile-achievement-card,
.profile-medal-card {
    --profile-rarity-accent: #94a3b8;
    position: relative;
    overflow: hidden;
}

.profile-achievement-card[data-rarity="uncommon"],
.profile-medal-card[data-rarity="uncommon"] {
    --profile-rarity-accent: #4ade80;
}

.profile-achievement-card[data-rarity="rare"],
.profile-medal-card[data-rarity="rare"] {
    --profile-rarity-accent: #60a5fa;
}

.profile-achievement-card[data-rarity="epic"],
.profile-medal-card[data-rarity="epic"] {
    --profile-rarity-accent: #c084fc;
}

.profile-achievement-card[data-rarity="legendary"],
.profile-medal-card[data-rarity="legendary"] {
    --profile-rarity-accent: #facc15;
}

.profile-achievement-card[data-rarity="mythic"],
.profile-medal-card[data-rarity="mythic"] {
    --profile-rarity-accent: #f472b6;
}

.profile-achievement-card[data-rarity="exclusive"],
.profile-medal-card[data-rarity="exclusive"] {
    --profile-rarity-accent: #22d3ee;
}

.profile-achievement-card::before,
.profile-medal-card::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    inset-inline: 0;
    height: 2px;
    background: var(--profile-rarity-accent);
    opacity: 0.72;
}

.profile-achievement-card[data-state="unlocked"] {
    border-color:
        color-mix(
            in srgb,
            var(--profile-rarity-accent) 34%,
            transparent
        );
    background:
        linear-gradient(
            145deg,
            color-mix(
                in srgb,
                var(--profile-rarity-accent) 5%,
                rgba(17, 27, 58, 0.56)
            ),
            rgba(17, 27, 58, 0.48)
        );
}

.profile-achievement-meta {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.profile-achievement-rarity,
.profile-medal-card-rarity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid
        color-mix(
            in srgb,
            var(--profile-rarity-accent) 35%,
            transparent
        );
    border-radius: 999px;
    color: var(--profile-rarity-accent);
    background:
        color-mix(
            in srgb,
            var(--profile-rarity-accent) 8%,
            transparent
        );
    font-size: 7px;
    font-weight: 900;
    line-height: 1;
}

.profile-achievement-rarity {
    min-height: 20px;
    padding: 0 7px;
}

.profile-achievement-state {
    min-height: 20px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: rgba(148, 163, 184, 0.9);
    background: rgba(148, 163, 184, 0.06);
    font-size: 7px;
    font-weight: 900;
}

.profile-achievement-state[data-state="unlocked"] {
    color: #86efac;
    background: rgba(34, 197, 94, 0.08);
}

.profile-achievement-progress span {
    background:
        linear-gradient(
            90deg,
            var(--profile-rarity-accent),
            var(--cyan)
        );
}

.profile-medal-card-rarity {
    position: absolute;
    z-index: 3;
    top: 10px;
    inset-inline-end: 10px;
    min-height: 21px;
    padding: 0 7px;
    backdrop-filter: blur(6px);
}

.profile-medal-card-date {
    margin-top: 4px;
    display: block;
    color: rgba(148, 163, 184, 0.72);
    font-size: 7px;
    line-height: 1.45;
}

.profile-medal-card:hover .profile-medal-card-icon,
.profile-achievement-card:hover .profile-achievement-icon {
    border-color:
        color-mix(
            in srgb,
            var(--profile-rarity-accent) 44%,
            transparent
        );
}

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

@media (max-width: 700px) {
    .profile-achievements-summary-wrap {
        width: 100%;
    }

    .profile-achievement-group-nav {
        margin-inline: -20px;
        padding-inline: 20px;
    }

    .profile-achievement-group-link {
        min-height: 40px;
    }

    .profile-achievements-skeleton-grid {
        grid-template-columns: 1fr;
    }
}

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

    .profile-medal-card {
        min-height: 180px;
        padding: 13px 9px 10px;
    }

    .profile-medal-card-icon {
        width: 56px;
        height: 56px;
    }

    .profile-medal-card-reason {
        padding: 7px 8px;
    }
}

@media (max-width: 360px) {
    .profile-medals-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-achievements-overall-progress > span,
    .profile-achievement-group-link,
    .profile-achievement-card,
    .profile-medal-card {
        transition: none;
    }

    .profile-achievements-skeleton-card {
        animation: none;
    }
}
