/* Styles for the embeddable leaderboard */
body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background-color: transparent; /* Allow host page background */
    color: #333; /* Default text color, can be customized */
    overflow: hidden; /* Prevent scrollbars within the iframe if possible */
}

.leaderboard-embed-container {
    padding: 10px;
    box-sizing: border-box;
    max-width: 100%;
}

.leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 8px 5px;
    border-bottom: 1px solid #eee; /* Light separator */
    transition: background-color 0.2s ease;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item:hover {
    background-color: #f9f9f9; /* Slight hover effect */
}

.leaderboard-item .rank {
    font-weight: bold;
    min-width: 25px;
    text-align: right;
    margin-right: 10px;
    color: #666;
}

.leaderboard-item .avatar {
    margin-right: 10px;
    flex-shrink: 0; /* Prevent avatar from shrinking */
}

.leaderboard-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    vertical-align: middle;
    object-fit: cover; /* Ensure image covers the area */
    background-color: #eee; /* Placeholder background */
}

.leaderboard-avatar-placeholder {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ddd;
    color: #666;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
    vertical-align: middle;
}

.leaderboard-item .name {
    flex-grow: 1; /* Allow name to take up remaining space */
    margin-right: 10px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-item .count {
    font-weight: bold;
    color: #007bff; /* Highlight the count, can be customized */
    text-align: right;
    min-width: 60px; /* Ensure counts align nicely */
    white-space: nowrap;
}

.no-data-message {
    text-align: center;
    color: #888;
    padding: 20px;
    font-style: italic;
}

/* Optional Footer Styles */
.embed-footer {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.embed-footer a {
    color: #888;
    text-decoration: none;
}

.embed-footer a:hover {
    text-decoration: underline;
}
