.lpd-profile {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    min-width: 0;
}

.lpd-profile-top {
    display: flex;
    gap: var(--space-xl);
    align-items: stretch;
    min-width: 0;
    width: 100%;
}

.lpd-identity {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    max-width: min(100%, 420px);
}

.lpd-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.lpd-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 3px solid rgba(201, 170, 88, 0.3);
    object-fit: cover;
    display: block;
}

.lpd-medal {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--bg-card);
    border-radius: 50%;
    padding: 2px;
    display: flex;
    line-height: 0;
}

.lpd-meta {
    min-width: 0;
}

.lpd-nickname {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    word-break: break-word;
    line-height: 1.2;
}

.lpd-rank-text {
    color: var(--accent-gold);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.lpd-secondary {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.lpd-steam-id {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-family: monospace;
}

.lpd-updated {
    color: var(--text-muted);
    font-size: 0.78rem;
    opacity: 0.85;
}

.lpd-links-updated {
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}

.lpd-stats-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
    grid-template-rows: minmax(64px, 1fr) minmax(64px, 1fr);
    gap: 7px;
    margin-left: auto;
    flex: 0 1 auto;
    width: min(100%, calc(28rem + 80px));
    max-width: 100%;
    min-width: 0;
    align-self: center;
}
.lpd-stats-grid--no-prize {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: minmax(64px, 1fr);
}

.lpd-stat {
    position: relative;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.lpd-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-gold);
    font-family: var(--font-heading);
    line-height: 1.15;
    position: relative;
    z-index: 1;
}

.lpd-stat--green { color: var(--accent-green); }
.lpd-stat--red { color: var(--accent-red); }
.lpd-stat--gold {
    color: var(--accent-gold);
    font-size: clamp(0.85rem, 1.45vw, 1.35rem);
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.15;
}

.lpd-stat-label {
    color: var(--text-secondary);
    margin-top: 2px;
    font-size: 0.74rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.lpd-stat-accent {
    color: var(--accent-gold);
    font-size: 0.7rem;
}

.lpd-stat--prize {
    grid-column: 3;
    grid-row: 1 / 3;
    border-color: rgba(201, 170, 88, 0.15);
}

.lpd-stat-value--wl {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.lpd-stat-wl-sep {
    color: var(--text-muted);
    font-weight: 400;
    margin: 0 2px;
}

.lpd-prize-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.lpd-prize-particles span {
    position: absolute;
    top: -1.2em;
    font-weight: 700;
    color: rgba(201, 170, 88, 0.12);
    animation: lpdParticleFall linear infinite;
    will-change: transform;
}

.lpd-stat--prize:hover .lpd-prize-particles span {
    color: rgba(201, 170, 88, 0.25);
}

@keyframes lpdParticleFall {
    0%   { transform: translateY(0); }
    100% { transform: translateY(calc(132px + 1.5em)); }
}

.lpd-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
}

.lpd-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.lpd-link:hover {
    color: var(--text-primary);
    border-color: rgba(201, 170, 88, 0.3);
    background: var(--bg-hover);
}

.lpd-link-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 2px;
}

.lpd-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.lpd-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lpd-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
}

.lpd-hero-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color var(--transition-fast);
}

.lpd-hero-card:hover {
    border-color: rgba(201, 170, 88, 0.3);
}

.lpd-hero-icon {
    width: 60px;
    height: 34px;
    border-radius: 4px;
    object-fit: cover;
}

.lpd-hero-name {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.lpd-hero-stats-row {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.lpd-hero-picks { color: var(--text-muted); font-weight: 400; }
.lpd-hero-wins { color: var(--accent-green); }
.lpd-hero-sep { color: var(--text-muted); }
.lpd-hero-losses { color: var(--accent-red); }

.lpd-matches-mobile { display: none; }

.lpd-match-row { cursor: pointer; }
.lpd-match-tournament { font-weight: 500; }
.lpd-match-round { color: var(--text-secondary); }

.lpd-match-hero {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lpd-match-hero-img {
    width: 40px;
    height: 23px;
    border-radius: 3px;
    object-fit: cover;
}

.lpd-match-hero-name { font-size: 0.85rem; }
.lpd-match-no-hero { color: var(--text-muted); }
.lpd-match-date { color: var(--text-muted); font-size: 0.85rem; }

.lpd-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
}

.lpd-badge--win { background: rgba(76, 175, 80, 0.2); color: var(--accent-green); }
.lpd-badge--loss { background: rgba(194, 60, 42, 0.2); color: var(--accent-red); }
.lpd-badge--pending { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }

.lpd-match-card {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-fast);
}

.lpd-match-card:hover { border-color: rgba(201, 170, 88, 0.3); }

.lpd-match-card-hero {
    width: 40px;
    height: 23px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

.lpd-match-card-body { flex: 1; min-width: 0; }

.lpd-match-card-name {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lpd-match-card-meta { font-size: 0.7rem; color: var(--text-muted); }

.lpd-participations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.lpd-tp-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-fast);
}

.lpd-tp-card:hover {
    border-color: rgba(201, 170, 88, 0.3);
}

.lpd-tp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.lpd-tp-mode {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.lpd-tp-place {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.lpd-tp-place--gold { color: var(--accent-gold); }
.lpd-tp-place--silver { color: var(--text-secondary); }

.lpd-tp-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.lpd-tp-meta {
    display: flex;
    gap: var(--space-sm);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.lpd-tp-prize {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.pagination-current { pointer-events: none; }
.pagination-ellipsis { color: var(--text-muted); padding: 0 var(--space-xs); }

@media (max-width: 1024px) {
    .lpd-profile-top {
        flex-direction: column;
        gap: var(--space-md);
    }

    .lpd-identity {
        max-width: 100%;
    }

    .lpd-stats-grid {
        margin-left: 0;
        align-self: center;
        width: min(100%, calc(28rem + 80px));
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .lpd-identity {
        flex-direction: column;
        text-align: center;
    }

    .lpd-secondary {
        justify-content: center;
    }

    .lpd-avatar {
        width: 72px;
        height: 72px;
    }

    .lpd-nickname {
        font-size: 1.3rem;
    }

    .lpd-stats-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
    }

    .lpd-stat--prize {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .lpd-stat-value {
        font-size: 1.1rem;
    }

    .lpd-stat--gold {
        font-size: clamp(0.88rem, 3.2vw, 1.28rem);
    }

    .lpd-links {
        justify-content: center;
    }

    .lpd-links-updated {
        margin-left: 0;
        flex-basis: 100%;
        text-align: center;
        white-space: normal;
    }

    .lpd-hero-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 6px;
    }

    .lpd-hero-icon { width: 50px; height: 28px; }
    .lpd-hero-name { font-size: 0.6rem; }

    .lpd-matches-desktop { display: none; }

    .lpd-matches-mobile {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
    }

    .lpd-participations-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 6px;
    }
}
