/* Player profile modal */
.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-modal.hidden {
    display: none;
}
.profile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 16, 0.72);
    backdrop-filter: blur(3px);
}
.profile-card {
    position: relative;
    width: min(560px, 92vw);
    max-height: 84vh;
    overflow-y: auto;
    background: linear-gradient(160deg, #1d1526, #14101c);
    border: 1px solid rgba(255, 102, 170, 0.25);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
    color: #eee;
}
.profile-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.profile-close:hover {
    color: #ff66aa;
}
.profile-header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255, 102, 170, 0.5);
    object-fit: cover;
}
.profile-name {
    font-size: 1.25em;
    font-weight: 700;
}
.profile-country {
    font-size: 0.75em;
    color: #bbb;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 1px 6px;
    vertical-align: middle;
}
.profile-sub {
    color: #ff9ccb;
    font-size: 0.9em;
    margin-top: 2px;
}
.profile-section {
    margin: 14px 0 8px;
    font-weight: 700;
    color: #ff9ccb;
    text-transform: uppercase;
    font-size: 0.78em;
    letter-spacing: 0.06em;
}
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
}
.profile-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 10px;
    text-align: center;
}
.profile-stat-val {
    font-size: 1.2em;
    font-weight: 700;
    color: #fff;
}
.profile-stat-label {
    font-size: 0.72em;
    color: #aaa;
    margin-top: 2px;
}
.profile-matches {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profile-match {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 0.88em;
}
.profile-badge {
    flex: 0 0 auto;
    font-size: 0.78em;
    font-weight: 700;
    border-radius: 6px;
    padding: 2px 8px;
}
.profile-badge.win {
    background: rgba(80, 220, 130, 0.16);
    color: #6fe39a;
}
.profile-badge.loss {
    background: rgba(255, 90, 110, 0.14);
    color: #ff8a9a;
}
.profile-badge.draw {
    background: rgba(255, 200, 80, 0.14);
    color: #ffd27a;
}
.profile-match-info {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-match-date {
    flex: 0 0 auto;
    color: #888;
    font-size: 0.82em;
}
.profile-empty {
    color: #999;
    padding: 10px 2px;
}

/* Leaderboard rows that can open a profile */
.daily-lb-row[data-osuid] {
    cursor: pointer;
}
.daily-lb-row[data-osuid]:hover {
    background: rgba(255, 102, 170, 0.08);
}
