.mod-myinvite-ranking .invitation-stats$profileComp-popup {
    display: none !important;
    position: fixed !important;
    top: 25vh !important;
    right: 25vw !important;
    z-index: 9999 !important;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    width: 220px;
    min-width: 220px;
    pointer-events: none;
}

.mod-myinvite-ranking .inviter-name,
.mod-myinvite-ranking .popup-name {
    font-weight: normal;
}

.mod-myinvite-ranking .ranking-stat-line,
.mod-myinvite-ranking .popup-stats-table td:last-child {
    font-weight: normal;
}

.mod-myinvite-ranking {
    font-family: sans-serif;
    max-width: 100%;
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
}

.ranking-table th {
    background-color: #f8f9fa;
    padding: 10px;
    text-align: center;
    font-size: 1.4rem;
    border-bottom: 2px solid #333;
}

.ranking-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.ranking-pos {
    width: 40px;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

/* Ensure the wrapper isn't adding extra padding */
.user-info-wrapper {
    position: static;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
}

.inviter-name {
    color: #2c5d88;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    display: block;
}

.inviter-name:hover {
    text-decoration: underline;
}

.ranking-stat-line {
    font-size: 0.95rem;
    color: #333;
    margin-top: 0px; /* Reduced from 4px to 0px for tighter spacing */
    margin-bottom: 5px; /* Add a tiny space below */
}

.invitation-stats-popup {
    display: none;
    position: fixed !important; /* Force fixed */
    top: 25vh !important;        /* 3/4 way up */
    right: 25vw !important;      /* Nudge to the sidebar area */
    z-index: 9999 !important;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 250px;
    padding: 0;
    pointer-events: none;
}

/* Ensure the hover still triggers the display */
.user-info-wrapper:hover .invitation-stats-popup {
    display: block !important;
}

/* Style the popup header */
.popup-header {
    background: #f8f9fa;
    border-bottom: 2px solid #2c5d88; /* A darker, clearer border */
    color: #2c5d88;
    padding: 8px;
    font-weight: bold;
}

.popup-body {
    padding: 10px;
}

.popup-avatar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.popup-name {
    font-weight: bold;
    color: #2c5d88;
}

/* Constraint the avatar size */
.popup-avatar {
    width: 40px !important;  /* Reduced from 50px */
    height: 40px !important;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
}

/* Style the popup table*/
.popup-stats-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse; /* This makes it look cleaner like your screenshot */
}

.popup-stats-table td {
    padding: 6px;
    border-bottom: 1px solid #dee2e6;
}

.popup-stats-table td:last-child {
    text-align: right;
    font-weight: bold;
}

@media (max-width: 768px) {
    .invitation-stats-popup {
        left: 0;
        top: 100%;
        min-width: 100%;
    }
}