.collection-stats {
    margin: 1.5rem 0;
    padding: 1.5rem;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(20, 22, 28, 0.92), rgba(30, 26, 40, 0.92));
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    color: #f2f2f2;
    animation: stats-fade-in 0.4s ease-out backwards;
}

@keyframes stats-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.collection-stats__summary {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.collection-stats__pill {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 700;
    font-size: 0.85rem;
}

.collection-stats__completion-label {
    margin: 0 0 0.4rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

.collection-stats__bar {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.collection-stats__bar--small {
    height: 6px;
    margin: 0.3rem 0;
}

.collection-stats__bar-fill {
    position: relative;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #4aa8ff, #b04aff);
    box-shadow: 0 0 10px rgba(176, 74, 255, 0.6);
    transition: width 0.6s ease-out;
    overflow: hidden;
}

.collection-stats__bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
    background-size: 200% 100%;
    animation: bar-shine 2.5s ease-in-out infinite;
}

@keyframes bar-shine {
    0% {
        background-position: 150% 0;
    }
    100% {
        background-position: -50% 0;
    }
}

.collection-stats__rarities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1.5rem 0;
}

.leaderboard__row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.leaderboard__row--me {
    background: rgba(176, 74, 255, 0.16);
    box-shadow: 0 0 0 1px rgba(176, 74, 255, 0.5);
}

.leaderboard__rank {
    width: 1.75rem;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    color: #f2f2f2;
    opacity: 0.7;
}

.leaderboard__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.leaderboard__main {
    flex: 1;
    min-width: 0;
}

.leaderboard__login {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #f2f2f2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard__percent {
    width: 3.2rem;
    text-align: right;
    font-weight: 700;
    color: #f2f2f2;
}

.collection-stats__rarity {
    animation: stats-fade-in 0.4s ease-out backwards;
    animation-delay: calc(var(--i) * 0.08s);
}

.collection-stats__rarity-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.collection-stats__rarity-count {
    font-size: 0.7rem;
    opacity: 0.7;
}

.collection-stats__rarity--commune .collection-stats__rarity-label {
    color: #ffffff;
}

.collection-stats__rarity--commune .collection-stats__bar-fill {
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.collection-stats__rarity--rare .collection-stats__rarity-label {
    color: #4aa8ff;
}

.collection-stats__rarity--rare .collection-stats__bar-fill {
    background: #4aa8ff;
    box-shadow: 0 0 8px rgba(74, 168, 255, 0.7);
}

.collection-stats__rarity--epique .collection-stats__rarity-label {
    color: #b04aff;
}

.collection-stats__rarity--epique .collection-stats__bar-fill {
    background: #b04aff;
    box-shadow: 0 0 8px rgba(176, 74, 255, 0.7);
}

.collection-stats__rarity--legendaire .collection-stats__rarity-label {
    color: #ffd23f;
}

.collection-stats__rarity--legendaire .collection-stats__bar-fill {
    background: #ffd23f;
    box-shadow: 0 0 8px rgba(255, 210, 63, 0.8);
}

.collection-stats__tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.collection-stats__tile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    animation: stats-fade-in 0.4s ease-out backwards;
    animation-delay: calc(var(--i) * 0.08s);
    transition: transform 0.15s ease-out, background 0.15s ease-out;
}

.collection-stats__tile:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

.collection-stats__tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    font-size: 1rem;
}

.collection-stats__tile-body {
    display: flex;
    flex-direction: column;
}

.collection-stats__tile strong {
    font-size: 1.4rem;
    line-height: 1.1;
}

.collection-stats__tile span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.75;
}

.collection-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.collection-filters__search {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    min-width: 220px;
}

.collection-filters__tabs {
    display: flex;
    gap: 0.4rem;
}

.collection-filters__tab {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s ease-out;
}

.collection-filters__tab:hover {
    background: rgba(255, 255, 255, 0.14);
}

.collection-filters__tab--active {
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
    color: #fff;
}

.collection-filters__reset {
    font-size: 0.85rem;
    color: inherit;
    opacity: 0.7;
}

.collection-set-title {
    margin: 2rem 0 0;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--color-border);
}

.collection-stats__sets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
}

.collection-stats__pill--set {
    background: rgba(74, 168, 255, 0.18);
}

.recycle-filters {
    margin: 1rem 0;
}

.recycle-lines {
    max-width: 700px;
    padding: 0;
    margin: 1rem 0;
    list-style: none;
}

.recycle-lines li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.4rem;
}
