:root {
    --bg: #07070a;
    --panel: #111116;
    --panel-2: #16151d;
    --line: rgba(255,255,255,.09);
    --text: #f7f5fa;
    --muted: #a7a2ad;
    --purple: #c05cff;
    --purple-dark: #7d2ab5;
    --green: #55d883;
    --red: #ff6464;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(155, 63, 214, .16),
            transparent 35%
        ),
        var(--bg);
    color: var(--text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: inherit;
}

button,
textarea {
    font: inherit;
}

.profile-topbar {
    width: min(
        1180px,
        calc(100% - 32px)
    );
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.profile-brand {
    color: white;
    text-decoration: none;
    font-weight: 950;
    letter-spacing: -.04em;
}

.profile-brand span {
    color: var(--purple);
}

.profile-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 850;
}

.profile-nav a:hover {
    color: white;
}

.profile-main {
    width: min(
        1040px,
        calc(100% - 32px)
    );
    margin: 28px auto 80px;
}

.profile-state {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 14px;
}

.profile-spinner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.13);
    border-top-color: var(--purple);
    animation: profile-spin .8s linear infinite;
}

@keyframes profile-spin {
    to {
        transform: rotate(360deg);
    }
}

.profile-error-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255, 80, 80, .11);
    border: 1px solid rgba(255, 80, 80, .28);
    color: #ff8989;
    font-size: 1.5rem;
    font-weight: 950;
}

.profile-hero {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        linear-gradient(
            135deg,
            rgba(192,92,255,.10),
            rgba(255,255,255,.015) 48%
        ),
        var(--panel);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: start;
}

.profile-avatar {
    width: 124px;
    height: 124px;
    border-radius: 30px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            rgba(192,92,255,.35),
            rgba(89,36,128,.28)
        );
    border: 1px solid rgba(192,92,255,.34);
    font-size: 2.7rem;
    font-weight: 950;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-name-row h1 {
    margin: 0;
    font-size: clamp(
        2rem,
        5vw,
        3.5rem
    );
    line-height: .95;
    letter-spacing: -.055em;
}

.profile-role {
    padding: 6px 9px;
    border-radius: 999px;
    color: #e8c5ff;
    border: 1px solid rgba(192,92,255,.32);
    background: rgba(192,92,255,.10);
    font-size: .68rem;
    font-weight: 950;
    letter-spacing: .08em;
}

.profile-role[data-role="owner"] {
    color: #ffd76f;
    border-color: rgba(255,215,111,.34);
    background: rgba(255,215,111,.08);
}

.profile-role[data-role="admin"] {
    color: #ff8f8f;
    border-color: rgba(255,100,100,.32);
    background: rgba(255,100,100,.08);
}

.profile-role[data-role="mod"] {
    color: #86c6ff;
    border-color: rgba(134,198,255,.30);
    background: rgba(134,198,255,.08);
}

.profile-presence-row {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.profile-presence-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #67626c;
}

.profile-presence-dot.online {
    background: var(--green);
    box-shadow:
        0 0 12px rgba(85,216,131,.42);
}

.profile-bio {
    max-width: 680px;
    margin: 20px 0 0;
    color: #d0cad5;
    line-height: 1.65;
    white-space: pre-wrap;
}

.profile-bio-editor {
    margin-top: 24px;
    max-width: 680px;
}

.profile-bio-editor label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: .67rem;
    font-weight: 950;
    letter-spacing: .1em;
}

.profile-bio-editor textarea {
    width: 100%;
    resize: vertical;
    min-height: 96px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #09090d;
    color: white;
    padding: 13px 14px;
    outline: none;
}

.profile-bio-editor textarea:focus {
    border-color:
        rgba(192,92,255,.55);
}

.profile-bio-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-bio-actions span {
    color: var(--muted);
    font-size: .72rem;
}

.profile-button {
    min-height: 40px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(192,92,255,.35);
    border-radius: 11px;
    background:
        rgba(192,92,255,.12);
    color: white;
    text-decoration: none;
    font-weight: 850;
    cursor: pointer;
}

.profile-button:hover {
    background:
        rgba(192,92,255,.19);
}

.profile-bio-status {
    min-height: 18px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .75rem;
}

.profile-info-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0,1fr));
    gap: 14px;
}

.profile-info-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.profile-info-card span,
.profile-game-title > div > span,
.profile-section-head > span {
    display: block;
    color: var(--muted);
    font-size: .64rem;
    font-weight: 950;
    letter-spacing: .09em;
}

.profile-info-card strong {
    display: block;
    margin-top: 6px;
    font-size: 1.08rem;
}

.profile-games {
    margin-top: 36px;
}

.profile-section-head h2 {
    margin: 5px 0 0;
    font-size: 1.65rem;
}

.profile-game-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0,1fr));
    gap: 16px;
}

.profile-game-card {
    padding: 22px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.profile-game-title {
    display: flex;
    align-items: center;
    gap: 13px;
}

.profile-game-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--panel-2);
    border: 1px solid var(--line);
    font-size: 1.25rem;
    font-weight: 950;
}

.profile-game-title h3 {
    margin: 3px 0 0;
    font-size: 1.12rem;
}

.profile-stat-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0,1fr));
    gap: 8px;
}

.profile-stat-grid > div {
    min-width: 0;
    padding: 11px 8px;
    border-radius: 12px;
    background: rgba(255,255,255,.025);
    text-align: center;
}

.profile-stat-grid span {
    display: block;
    color: var(--muted);
    font-size: .66rem;
}

.profile-stat-grid strong {
    display: block;
    margin-top: 5px;
    font-size: 1.18rem;
}

@media (max-width: 720px) {

    .profile-topbar {
        padding: 12px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-hero {
        padding: 24px;
        grid-template-columns: 1fr;
    }

    .profile-avatar {
        width: 98px;
        height: 98px;
        border-radius: 24px;
    }

    .profile-info-grid,
    .profile-game-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {

    .profile-main {
        width:
            min(
                100% - 20px,
                1040px
            );
    }

    .profile-hero {
        padding: 19px;
    }

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

    .profile-nav {
        gap: 13px;
    }
}

/* B3 PROFILE V4 HIDDEN FIX START */

[hidden] {
    display: none !important;
}

.profile-state[hidden],
#profileContent[hidden],
#profileError[hidden],
#profileLoading[hidden],
#profileOwnBio[hidden] {
    display: none !important;
}

/* B3 PROFILE V4 HIDDEN FIX END */

/* =====================================================
   HUB LEVEL V1
===================================================== */

.profile-progression {
    margin:
        22px 0 26px;

    padding:
        22px 24px;

    border:
        1px solid
        rgba(187, 91, 255, 0.28);

    border-radius:
        20px;

    background:
        linear-gradient(
            135deg,
            rgba(70, 25, 103, 0.32),
            rgba(15, 13, 22, 0.94)
        );

    box-shadow:
        0 18px 50px
        rgba(0, 0, 0, 0.18);
}


.profile-progression-head {
    display:
        flex;

    align-items:
        flex-end;

    justify-content:
        space-between;

    gap:
        20px;
}


.profile-progression-label {
    display:
        block;

    margin-bottom:
        4px;

    color:
        #bda9ce;

    font-size:
        11px;

    font-weight:
        900;

    letter-spacing:
        0.15em;
}


#profileHubLevel {
    display:
        block;

    font-size:
        42px;

    line-height:
        1;

    color:
        #ffffff;
}


.profile-progression-xp {
    display:
        flex;

    flex-direction:
        column;

    align-items:
        flex-end;

    gap:
        3px;
}


#profileTotalXp {
    color:
        #a99cb5;

    font-size:
        11px;

    font-weight:
        800;
}


#profileLevelXp {
    color:
        #e3c6ff;

    font-size:
        14px;
}


.profile-xp-track {
    width:
        100%;

    height:
        10px;

    margin-top:
        18px;

    overflow:
        hidden;

    border-radius:
        999px;

    background:
        rgba(255, 255, 255, 0.07);
}


.profile-xp-bar {
    width:
        0;

    height:
        100%;

    border-radius:
        inherit;

    background:
        linear-gradient(
            90deg,
            #853cff,
            #d34cff
        );

    transition:
        width 0.4s ease;
}


@media (max-width: 600px) {

    .profile-progression-head {
        align-items:
            flex-start;

        flex-direction:
            column;
    }


    .profile-progression-xp {
        align-items:
            flex-start;
    }
}
/* B3_PROFILE_STREAK_MILESTONES_CSS_V1 */

.profile-streak-milestones {
    margin-top: 16px;
    padding: 18px 20px;
    border: 1px solid rgba(177, 73, 255, .32);
    border-radius: 16px;
    background:
        rgba(85, 19, 117, .12);
}

.profile-streak-milestone-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.profile-streak-milestone-head > div > span {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    opacity: .62;
}

.profile-streak-milestone-head strong {
    font-size: 18px;
}

#profileStreakProgressText {
    font-size: 12px;
    opacity: .7;
}

.profile-streak-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
}

.profile-streak-progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            #8b35ef,
            #c15cff
        );
    transition: width .45s ease;
}

.profile-streak-milestone-list {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.profile-streak-milestone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    min-height: 46px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 11px;
    background: rgba(0,0,0,.15);
}

.profile-streak-milestone strong {
    font-size: 18px;
}

.profile-streak-milestone span {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    opacity: .5;
}

.profile-streak-milestone.is-next {
    border-color:
        rgba(177, 73, 255, .65);

    background:
        rgba(139, 53, 239, .12);
}

.profile-streak-milestone.is-reached {
    border-color:
        rgba(193, 92, 255, .75);

    background:
        rgba(139, 53, 239, .20);
}

.profile-streak-milestone.is-reached span {
    opacity: 1;
}

@media (max-width: 650px) {

    .profile-streak-milestone-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

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

/* B3_PROFILE_STREAK_MILESTONES_CSS_V1 END */