
.level-widget {
    width: 200px;
    text-align: center;
    color: #111;
    font-weight: 800;
}

.level-title {
    font-size: 18px;
    margin-bottom: 6px;
}

.level-circle {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #123a82;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
}

.xp-bar-wrapper {
    position: relative;
    width: 240px;
    height: 20px;
    margin: 0 auto;
    background: #2d2626;
    border: 2px solid #111;
    border-radius: 4px;
}

.xp-fill {
    height: 100%;
    background: #a735f4;
    border-radius: 2px;
}

.xp-label {
    position: absolute;
    left: 14px;
    top: 17px;
    width: 52px;
    height: 24px;
    background: #123a82;
    color: white;
    border-radius: 0 0 10px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: 900;
}

.xp-value {
    position: absolute;
    right: 6px;
    top: 22px;
    font-size: 14px;
    color: #111;
    font-weight: 900;
}

.gamification-xp-bar {
    display: flex;
    align-items: center;
    width: 200px;
    margin: 0 10px;
    padding: 4px 0;
    cursor: pointer;
    user-select: none;
}

/* Navy sparkle-star badge holding the level number. */
.gamification-xp-star {
    position: relative;
    flex: 0 0 auto;
    width: 55px;
    height: 55px;
    margin-right: -30px; /* overlap the left end of the track */
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.gamification-xp-star-shape {
    display: block;
    width: 100%;
    height: 100%;
}

.gamification-xp-star-shape polygon {
    fill: #16306b;
    stroke: #16306b;
    stroke-width: 16;
    stroke-linejoin: round; /* rounds the star points */
}

.gamification-xp-level {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 2px; /* optical centring within the star */
    color: #fff;
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
}

/* Dark rounded capsule track. */
.gamification-xp-bar-track {
    position: relative;
    flex: 1 1 auto;
    height: 20px;
    background-color: var(--fhm-dark-gray);
    border-radius: 14px;
    overflow: hidden;
}

/* Purple progress fill, inset by 3px so the dark track shows as a gap around it. */
.gamification-xp-bar-fill {
    position: absolute;
    left: 3px;
    top: 3px;
    height: calc(100% - 6px);
    min-width: 22px;
    max-width: calc(100% - 6px);
    background-color: var(--fhm-purple);
    border-radius: 11px;
    transition: width 0.4s ease;
}

.gamification-xp-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 14px; /* balance against the overlapping star */
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 1px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}