.user-card {
    font-family: var(--mainFont);
    border-style: none;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    height: 230px;
    position: relative;
}
@media (max-width: 800px) {
    .user-card {
        height: 200px;
        border-radius: 16px;
    }
}

.user-card-top {
    width: 100%;
    height: 50%;
    display: flex;
    flex-direction: column;
}

.user-card-bottom {
    width: 100%;
    height: 50%;
    display: flex;
    flex-direction: column;
}

/* Background image wrapper — enables zoom/offset via CSS variables */
.user-card-bg-wrap {
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.user-card-bg-wrap .user-card-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--ux, 50%) var(--uy, 50%);
    transform-origin: var(--ux, 50%) var(--uy, 50%);
    transform: scale(var(--uz, 1));
    display: block;
}

/* Legacy bare .user-card-bg (no wrapper) — keep working */
.user-card-top > .user-card-bg {
    width: 100%;
    object-fit: cover;
    flex: 1;
    min-height: 0;
}

/* Profile image wrapper — provides circular clip so zoom stays inside the circle */
.user-card-profile-wrap {
    width: 90px;
    height: 90px;
    position: absolute;
    transform: translate(-50%, -50%);
    margin-left: 90px;
    border-radius: 50%;
    outline: 4px solid white;
    background: white;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 800px) {
    .user-card-profile-wrap {
        margin-left: 15%;
        width: 70px;
        height: 70px;
    }
}

.user-card-profile-wrap .user-card-profile {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--ux, 50%) var(--uy, 50%);
    transform-origin: var(--ux, 50%) var(--uy, 50%);
    transform: scale(var(--uz, 1));
    display: block;
    border-radius: 0;
    border: none;
    outline: none;
}

/* Legacy bare .user-card-profile (no wrapper) — keep working */
.user-card > .user-card-profile {
    width: 90px;
    height: 90px;
    position: absolute;
    transform: translate(-50%, -50%);
    margin-left: 90px;
    border-radius: 50px;
    border-color: white;
    border-width: 4px;
    border-style: solid;
    background: white;
    object-fit: cover;
}
@media (max-width: 800px) {
    .user-card > .user-card-profile {
        margin-left: 15%;
        width: 70px;
        height: 70px;
    }
}

.user-card-username {
    font-size: 1.2rem;
    font-weight: bold;
    margin: auto;
}
@media (max-width: 800px) {
    .user-card-username {
        padding: 8px 16px;
        font-size: 1.2rem;
    }
}

.user-card-stats {
    display: flex;
    gap: 60px;
    align-items: center;
    text-align: center;
    margin: auto;
    margin-bottom: 20px;
}
@media (max-width: 800px) {
    .user-card-stats {
        padding: 16px;
        gap: 30px;
    }
}

.user-card-stat {
    font-size: 1rem;
}

.user-card-stat-num {
    font-weight: 600;
}
