/* ============================================================
   Players & Leagues — Public Page Styles
   Add these to your site.css or as a separate stylesheet
   ============================================================ */

/* ── Player Search ── */
.player-search-bar {
    margin: 1.5rem 0;
}

.player-search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 16px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

    .player-search-input:focus {
        border-color: var(--color-accent);
    }

/* ── Player Directory Grid ── */
.player-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.player-directory-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.2s;
}

    .player-directory-link:hover {
        transform: translateY(-4px);
    }

.player-directory-name {
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
}

.player-directory-skill {
    background: var(--color-primary);
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ── Player Profile Page ── */
.player-profile {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 1rem;
}

.player-profile-card {
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
}

.player-profile-info h1 {
    margin-top: 0;
}

.player-skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.skill-level {
    font-size: 1.1rem;
    font-weight: 800;
}

.skill-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.player-bio {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.player-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.player-leagues {
    margin-top: 2rem;
}

.player-league-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.player-league-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--color-card-bg);
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-text);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.15s, box-shadow 0.15s;
}

    .player-league-item:hover {
        transform: translateX(4px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

.player-league-name {
    font-weight: 700;
    color: var(--color-primary);
}

.player-league-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.stat-win {
    color: #38B000;
    font-weight: 600;
}

.stat-loss {
    color: #D32F2F;
    font-weight: 600;
}

.stat-draw {
    color: #FF8C00;
    font-weight: 600;
}

.stat-pts {
    color: var(--color-primary);
}

.player-external-links {
    margin-top: 1.5rem;
}

.player-external-link {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px;
    background: var(--color-bg);
    border-radius: 8px;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--color-accent-hover);
}

.player-back-link {
    margin-top: 2rem;
}

/* ── Leagues List ── */
.leagues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.league-card {
    background: var(--color-surface);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

    .league-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    }

.league-card-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}

.league-card-header-fixeddoubles {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
}

.league-card-header-mixer {
    background: linear-gradient(135deg, #6A1B9A, #AB47BC);
}

.league-card-header-ladder {
    background: linear-gradient(135deg, #FF8C00, #FFB347);
}

.league-format-icon {
    font-size: 1.5rem;
}

.league-card-format {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
}

.league-card-type {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
}

.league-card-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

    .league-card-body h2 {
        margin: 0 0 0.5rem;
        font-size: 1.15rem;
    }

.league-card-desc {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.league-card-meta {
    display: flex;
    gap: 1.25rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.league-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── League Status Badges ── */
.league-status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.league-status-registration {
    background: rgba(0, 119, 182, 0.1);
    color: #0077B6;
}

.league-status-active {
    background: rgba(56, 176, 0, 0.1);
    color: #38B000;
}

.league-status-completed {
    background: rgba(102, 102, 102, 0.1);
    color: #666;
}

.league-status-cancelled {
    background: rgba(211, 47, 47, 0.1);
    color: #D32F2F;
}

/* ── League Detail Page ── */
.league-header {
    margin-bottom: 2rem;
}

    .league-header h1 {
        margin-bottom: 0.5rem;
    }

.league-header-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.league-description {
    color: var(--color-text-muted);
    line-height: 1.6;
}

.league-section {
    margin-top: 2.5rem;
}

/* ── Standings ── */
/* ── Standings Card Grid ── */
.standings-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.standing-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 0.75rem 1rem;
    background: var(--color-surface);
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

    .standing-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }

/* Top 3 accent borders */
.standing-card-top-1 {
    border-top: 3px solid #FFD700;
}

.standing-card-top-2 {
    border-top: 3px solid #C0C0C0;
}

.standing-card-top-3 {
    border-top: 3px solid #CD7F32;
}

/* Rank */
.standing-card-rank {
    margin-bottom: 0.4rem;
}

.rank-medal {
    font-size: 1.4rem;
}

.rank-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 10px;
    border-radius: 12px;
}

/* Avatar area */
.standing-card-avatar {
    margin-bottom: 0.5rem;
}

/* Name */
.standing-card-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-primary);
    line-height: 1.3;
    margin-bottom: 0.15rem;
    word-break: break-word;
}

.standing-card-partner {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

/* Record (W / L / D) */
.standing-card-record {
    display: flex;
    gap: 0.4rem;
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}

/* Points — prominent */
.standing-card-pts {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.standing-pts-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.standing-pts-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

/* Point differential */
.standing-card-diff {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--color-text-muted);
}

/* Point differential badge */
.stat-diff {
    font-weight: 700;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--color-text-muted);
}

/* ── Matches ── */
.league-round-header {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.league-round-date {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ── Match Card — court stripe on left, content centered ── */
.match-card {
    display: flex;
    background: var(--color-card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.match-court-stripe {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 0.5rem;
    min-width: 36px;
    flex-shrink: 0;
    user-select: none;
}

.match-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    width: 100%;
    text-align: center;
}

.match-team {
    flex: 1;
    min-width: 0;
}

    .match-team a {
        text-decoration: none;
        color: var(--color-text);
        font-weight: 600;
    }

        .match-team a:hover {
            color: var(--color-accent);
        }

.match-partner {
    font-weight: 400;
    font-size: 0.9em;
    color: var(--color-text-muted);
}

    .match-partner a {
        font-weight: 400;
        color: var(--color-text-muted);
    }

        .match-partner a:hover {
            color: var(--color-accent);
        }

/* Winner styling */
.match-winner a {
    font-weight: 800;
    color: var(--color-primary);
}

.match-winner .match-partner a {
    color: var(--color-primary);
    font-weight: 500;
}

.match-winner-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 50%;
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* Score display */
.match-score-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.match-game-score {
    background: var(--color-primary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.match-vs {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Completed match subtle styling */
.match-completed {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

    .match-completed .match-court-stripe {
        opacity: 0.75;
    }

/* ── Responsive ── */
@media (max-width: 767px) {
    .player-profile {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .player-profile-card {
        position: static;
        text-align: center;
    }

    .standings-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .standing-card {
        padding: 1rem 0.5rem 0.75rem;
    }

    .standing-pts-value {
        font-size: 1.2rem;
    }

    .match-teams {
        flex-direction: column;
        gap: 0.5rem;
    }

    .match-team {
        text-align: center;
    }

    .match-court-stripe {
        min-width: 28px;
        font-size: 0.65rem;
        padding: 0.5rem 0.35rem;
    }

    .leagues-grid {
        grid-template-columns: 1fr;
    }

    .player-directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
}

/* Tablet: 4 cards per row */
@media (min-width: 768px) and (max-width: 1199px) {
    .standings-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================================
   Media Tagger Component
   ============================================================ */
/* ============================================================
   Media Tagger Component — Site-themed (Maroon & Cyan)
   Used on photo gallery lightbox and public gallery pages
   ============================================================ */
.media-tagger {
    margin-top: 0.75rem;
}

.media-tags-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.media-tags-icon {
    font-size: 0.9rem;
    margin-right: 0.25rem;
}

/* ── Tag Chips — maroon-tinted pills ── */
.media-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 4px 12px;
    background: var(--color-primary, #7A1530);
    color: #fff;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
}

    .media-tag-chip:hover {
        background: var(--color-primary-light, #9B2847);
        text-decoration: none;
        color: #fff;
        transform: translateY(-1px);
    }

.media-tag-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}

    .media-tag-remove:hover {
        color: #fff;
    }

/* ── Action Buttons — accent-colored ── */
.media-tag-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-media-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 6px 16px;
    background: var(--color-primary, #7A1530);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
}

    .btn-media-tag:hover {
        background: var(--color-primary-light, #9B2847);
        transform: translateY(-1px);
    }

.btn-media-tag-secondary {
    background: transparent;
    color: var(--color-primary, #7A1530);
    border: 1px solid var(--color-primary, #7A1530);
    font-size: 0.78rem;
}

    .btn-media-tag-secondary:hover {
        background: var(--color-primary, #7A1530);
        color: #fff;
    }

/* ── Tag Picker — dropdown search panel ── */
.media-tag-picker {
    margin-top: 0.5rem;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-primary-border);
    border-radius: 10px;
    padding: 0.75rem;
    max-width: 320px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.media-tag-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-primary-border);
    border-radius: 6px;
    background: var(--color-bg, #f5f3f0);
    color: var(--color-text, #2c2c2c);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s;
}

    .media-tag-search:focus {
        outline: none;
        border-color: var(--color-accent, #00AEEF);
        box-shadow: 0 0 0 2px var(--color-accent-focus);
    }

    .media-tag-search::placeholder {
        color: var(--color-text-muted, #999);
    }

.media-tag-results {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    background: var(--color-bg, #f5f3f0);
}

.media-tag-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    background: transparent;
    border: none;
    color: var(--color-text, #2c2c2c);
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: 4px;
    text-align: left;
    width: 100%;
    transition: background-color 0.12s;
}

    .media-tag-result:hover:not(:disabled) {
        background: var(--color-primary-tint);
        color: var(--color-primary, #7A1530);
    }

    .media-tag-result.tagged {
        opacity: 0.45;
        cursor: default;
        background: transparent;
    }

.tag-check {
    color: var(--color-accent, #00AEEF);
    font-weight: 700;
}

.media-tag-no-results {
    padding: 0.75rem;
    color: var(--color-text-muted, #999);
    font-size: 0.82rem;
    text-align: center;
    font-style: italic;
}

.media-tag-status {
    font-size: 0.78rem;
    color: var(--color-accent, #00AEEF);
    margin-top: 0.35rem;
    font-weight: 500;
}


/* ============================================================
   Player Profile — Tagged Media Section
   ============================================================ */

.player-media-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

    .player-media-section h2 {
        margin: 0 0 1.5rem;
        font-size: 1.3rem;
    }

    .player-media-section h3 {
        font-size: 0.85rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        margin: 1.5rem 0 0.75rem;
        color: var(--color-primary, #7A1530);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .player-media-section h3::after {
            content: "";
            flex: 1;
            height: 1px;
            background: rgba(0, 0, 0, 0.08);
        }

/* -- Photo Grid -- */
.player-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.player-media-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background-color: var(--color-bg, #f5f3f0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .player-media-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    }

.player-media-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.player-media-item:hover .player-media-thumb {
    transform: scale(1.06);
}

.player-media-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.player-media-item:hover::after {
    opacity: 1;
}

/* -- Video Cards -- */
.player-media-grid-video {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.player-media-video {
    aspect-ratio: auto;
    background: var(--color-surface, #fff);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

    .player-media-video::after {
        display: none;
    }

.player-media-video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

    .player-media-video-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

.player-media-video:hover .player-media-video-thumb img {
    transform: scale(1.04);
}

.player-media-video-thumb .video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.player-media-video:hover .video-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.player-media-video-title {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text, #2c2c2c);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* -- Media Tagger inside Video Cards --
   Match the same compact chip + button style used on photo tags */
.player-media-video .media-tagger {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.player-media-video .media-tags-list {
    gap: 0.25rem;
    margin-bottom: 0.35rem;
}

.player-media-video .media-tag-chip {
    font-size: 0.72rem;
    padding: 2px 7px;
}

.player-media-video .media-tag-actions {
    gap: 0.3rem;
}

.player-media-video .btn-media-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
}

/* -- Responsive -- */
@media (max-width: 767px) {
    .player-media-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .player-media-grid-video {
        grid-template-columns: 1fr;
    }
}
/* ── Hero Banner ── */
.pp-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark, #5C0F24) 50%, var(--color-navbar, #1a1a2e) 100%);
    padding: 2.5rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}

    .pp-hero::before {
        content: "";
        position: absolute;
        top: -100px;
        right: -80px;
        width: 400px;
        height: 400px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.025);
    }

    .pp-hero::after {
        content: "";
        position: absolute;
        bottom: -60px;
        left: 10%;
        width: 250px;
        height: 250px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.015);
    }

.pp-hero-inner {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ── Player Card with XP ring ── */
.pp-hero-card-wrap {
    position: relative;
    flex-shrink: 0;
}

.pp-xp-ring {
    position: absolute;
    inset: -6px;
    border-radius: 24px;
    z-index: 0;
    background: conic-gradient( var(--color-highlight, #D4A843) 0deg, var(--color-accent) calc(var(--xp-pct, 0) * 2.45deg), rgba(255, 255, 255, 0.08) calc(var(--xp-pct, 0) * 2.45deg), rgba(255, 255, 255, 0.08) 360deg );
    animation: pp-ring-glow 4s ease-in-out infinite alternate;
}

@keyframes pp-ring-glow {
    0% {
        filter: brightness(0.9);
    }

    100% {
        filter: brightness(1.1);
    }
}

.pp-hero-card-wrap .player-card {
    position: relative;
    z-index: 1;
}

.pp-level-pip {
    position: absolute;
    bottom: -8px;
    right: -8px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-highlight, #D4A843), #B8922F);
    color: var(--color-primary-dark, #5C0F24);
    font-weight: 900;
    font-size: 0.755rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--color-surface, #fff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ── Hero Info ── */
.pp-hero-info {
    flex: 1;
    color: #fff;
    min-width: 0;
}

.pp-hero-name {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 0.15rem;
}

.pp-hero-tagline {
    color: var(--color-highlight, #D4A843);
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.pp-hero-bio {
    font-size: 0.92rem;
    line-height: 1.65;
    opacity: 0.88;
    max-width: 550px;
    margin: 0 0 1rem;
}

.pp-hero-meta {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.pp-meta-item {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* ── Hero XP Bar ── */
.pp-hero-xp {
    max-width: 380px;
    margin-bottom: 1rem;
}

.pp-hero-xp-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
}

.pp-hero-xp-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.pp-hero-xp-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-highlight, #D4A843));
    transition: width 1.5s ease;
}

/* ── Hero Action Buttons ── */
.pp-hero-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    border: none;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.pp-btn-gold {
    background: var(--color-highlight, #D4A843);
    color: var(--color-primary-dark, #5C0F24);
}

    .pp-btn-gold:hover {
        background: #e0b44f;
        color: var(--color-primary-dark, #5C0F24);
    }

.pp-btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

    .pp-btn-outline:hover {
        border-color: #fff;
        background: rgba(255, 255, 255, 0.06);
        color: #fff;
    }

/* ── Stat Tiles ── */
.pp-stat-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-top: -1.5rem;
    position: relative;
    z-index: 10;
    margin-bottom: 1.75rem;
}

.pp-stat-tile {
    background: var(--color-surface, #fff);
    border-radius: 12px;
    padding: 1.1rem 0.75rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s;
}

    .pp-stat-tile:hover {
        transform: translateY(-2px);
    }

.pp-stat-tile-icon {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.pp-stat-tile-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary);
    display: block;
}

.pp-stat-tile-lbl {
    font-size: 0.63rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ── Content Area ── */
.pp-content {
    padding-bottom: 2rem;
}

/* ── Two-Column Panels ── */
.pp-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.pp-panel {
    background: var(--color-surface, #fff);
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.pp-panel-full {
    margin-bottom: 1.25rem;
}

.pp-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

/* ── Badge Row ── */
.pp-badge-row {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
}

.pp-badge-slot {
    flex-shrink: 0;
    width: 90px;
    text-align: center;
    transition: transform 0.25s;
}

    .pp-badge-slot:hover {
        transform: translateY(-4px);
    }

.pp-badge-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    margin: 0 auto 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.pp-bc-common {
    background: linear-gradient(145deg, #e8e8e8, #c8c8c8);
}

.pp-bc-uncommon {
    background: linear-gradient(145deg, #a0e4ff, var(--color-accent, #00AEEF));
}

.pp-bc-rare {
    background: linear-gradient(145deg, #fce5a0, var(--color-highlight, #D4A843));
}

.pp-bc-legendary {
    background: linear-gradient(145deg, var(--color-highlight, #D4A843), var(--color-primary));
}

.pp-bc-hidden {
    background: linear-gradient(145deg, #D8B4FE, #8B5CF6);
}

.pp-badge-count {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    border: 2px solid var(--color-surface, #fff);
}

.pp-badge-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.25;
}

.pp-badge-tier {
    font-size: 0.58rem;
    color: var(--color-text-muted);
}

/* ── Badge Progress ── */
.pp-progress-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pp-progress-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--color-card-bg);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.15s;
}

    .pp-progress-item:hover {
        transform: translateX(3px);
    }

.pp-progress-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.pp-progress-info {
    flex: 1;
    min-width: 0;
}

.pp-progress-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-text);
}

.pp-progress-desc {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin: 0.1rem 0 0.35rem;
}

.pp-progress-bar {
    height: 5px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.pp-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-highlight, #D4A843));
}

.pp-progress-pct {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-weight: 600;
    flex-shrink: 0;
    min-width: 42px;
    text-align: right;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .pp-hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .pp-hero-bio {
        margin: 0 auto 1rem;
    }

    .pp-hero-meta {
        justify-content: center;
    }

    .pp-hero-xp {
        margin: 0 auto 1rem;
    }

    .pp-hero-actions {
        justify-content: center;
    }

    .pp-stat-strip {
        grid-template-columns: repeat(3, 1fr);
    }

    .pp-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .pp-hero {
        padding: 1.5rem 0 2.5rem;
    }

    .pp-hero-name {
        font-size: 1.5rem;
    }

    .pp-stat-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .pp-badge-row {
        gap: 0.75rem;
    }

    .pp-badge-slot {
        width: 75px;
    }

    .pp-badge-circle {
        width: 58px;
        height: 58px;
        font-size: 1.4rem;
    }
}

.invite-panel {
    background: var(--color-surface);
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.invite-header h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    color: var(--color-primary);
}

.invite-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0 0 1.25rem;
}

/* ── Link Box ── */
.invite-link-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.invite-link-input {
    flex: 1;
    padding: 0.6rem 0.85rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: "SF Mono", "Cascadia Code", monospace;
    color: var(--color-text);
    background: var(--color-bg);
    outline: none;
    min-width: 0;
}

    .invite-link-input:focus {
        border-color: var(--color-accent);
    }

.invite-copy-btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

    .invite-copy-btn:hover {
        background: var(--color-primary-light);
    }

/* ── Stats ── */
.invite-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.invite-stat {
    text-align: center;
}

.invite-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    display: block;
}

.invite-stat-lbl {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ── Badge Track ── */
.invite-badge-track {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.invite-badge-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: var(--color-card-bg);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.15s;
}

    .invite-badge-step:hover {
        transform: translateX(3px);
    }

.invite-badge-earned {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), rgba(34, 197, 94, 0.02));
    border-color: rgba(34, 197, 94, 0.15);
}

.invite-badge-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.invite-badge-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.invite-badge-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-text);
}

.invite-badge-req {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

.invite-badge-check {
    color: #22c55e;
    font-weight: 800;
    font-size: 1rem;
}

.invite-badge-progress {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* ── Referral List ── */
.invite-referral-list h4 {
    font-size: 0.82rem;
    color: var(--color-primary);
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.invite-referral-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 0.85rem;
}

    .invite-referral-item:last-child {
        border-bottom: none;
    }

.invite-referral-name {
    font-weight: 600;
    color: var(--color-text);
}

.invite-referral-date {
    color: var(--color-text-muted);
    font-size: 0.78rem;
}

.invite-loading {
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 0.88rem;
}

@media (max-width: 600px) {
    .invite-link-box {
        flex-direction: column;
    }

    .invite-stats {
        gap: 1rem;
    }
}

.pp-fun-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.pp-fun-stat {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: var(--color-card-bg);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.15s;
}

    .pp-fun-stat:hover {
        transform: translateY(-2px);
    }

.pp-fun-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.pp-fun-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    display: block;
}

.pp-fun-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-primary);
    display: block;
    line-height: 1.2;
}

/* Stack label + value vertically */
.pp-fun-stat {
    flex-wrap: wrap;
}

.pp-fun-label,
.pp-fun-value {
    flex-basis: calc(100% - 2.5rem);
}

@media (max-width: 600px) {
    .pp-fun-stats {
        grid-template-columns: 1fr 1fr;
    }
}
