.collection-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid rgba(91, 113, 147, .38);
    border-radius: 10px;
    background: rgba(8, 15, 28, .78);
}

.collection-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legacy-original-content .collection-filter,
.legacy-original-content .collection-show-more {
    min-height: 40px;
    border: 1px solid rgba(53, 215, 255, .28);
    border-radius: 8px;
    background: rgba(53, 215, 255, .08);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    padding: 8px 12px;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.legacy-original-content .collection-filter:hover,
.legacy-original-content .collection-filter.is-active,
.legacy-original-content .collection-show-more:hover {
    border-color: rgba(53, 215, 255, .72);
    background: rgba(53, 215, 255, .18);
    transform: translateY(-1px);
}

.collection-search {
    display: grid;
    gap: 6px;
    min-width: min(100%, 290px);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.legacy-original-content .collection-search input {
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(91, 113, 147, .48);
    border-radius: 8px;
    outline: none;
    background: rgba(2, 10, 24, .82);
    color: var(--text);
    font: inherit;
    padding: 8px 11px;
}

.legacy-original-content .collection-search input:focus {
    border-color: rgba(53, 215, 255, .72);
    box-shadow: 0 0 0 3px rgba(53, 215, 255, .1);
}

.collection-source-note,
.collection-status {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    margin: 8px 0 14px;
}

.collection-status {
    color: var(--gold-2);
    font-weight: 800;
}

.legacy-original-content .collection-card {
    min-width: 0;
}

.legacy-original-content .collection-card .outfit-header {
    align-items: flex-start;
}

.legacy-original-content .collection-card .outfit-images {
    flex-wrap: wrap;
}

.legacy-original-content .collection-card .outfit-info {
    min-width: 0;
}

.legacy-original-content .collection-card .outfit-name {
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.25;
    margin: 6px 0 8px;
}

.collection-kind {
    display: inline-flex;
    border: 1px solid rgba(245, 194, 66, .32);
    border-radius: 999px;
    background: rgba(245, 194, 66, .09);
    color: var(--gold-2);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    padding: 3px 7px;
    text-transform: uppercase;
}

.collection-kind + .collection-kind {
    margin-left: 5px;
}

.collection-kind-custom {
    border-color: rgba(181, 104, 255, .42);
    background: rgba(181, 104, 255, .12);
    color: #d8b2ff;
}

.collection-genders {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.legacy-original-content .collection-card .bonus-item {
    gap: 5px;
    justify-content: flex-start;
    line-height: 1.25;
}

.legacy-original-content .collection-card .bonus-key {
    color: var(--text);
    font-weight: 700;
}

.legacy-original-content .collection-card .bonus-value {
    color: var(--gold-2);
}

.legacy-original-content .collection-card .outfit-image {
    position: relative;
    overflow: hidden;
}

.legacy-original-content .collection-card .outfit-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 15%, rgba(255, 255, 255, .07) 45%, transparent 75%);
    transform: translateX(-100%);
    animation: collection-shimmer 1.5s infinite;
}

.legacy-original-content .collection-card .outfit-image:has(img.is-loaded)::before {
    display: none;
}

.legacy-original-content .collection-card img {
    position: relative;
    opacity: 0;
    transition: opacity .2s ease;
}

.legacy-original-content .collection-card img.is-loaded {
    opacity: 1;
}

.legacy-original-content .collection-card img.outfit-load-failed {
    opacity: .35;
}

.collection-show-more {
    display: block;
    margin: 20px auto 0;
}

.collection-show-more[hidden] {
    display: none;
}

.collection-empty,
.collection-loading,
.collection-error {
    border: 1px dashed rgba(91, 113, 147, .48);
    border-radius: 10px;
    background: rgba(8, 15, 28, .66);
    color: var(--muted);
    padding: 24px;
    text-align: center;
}

.collection-loading::before {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    margin: 0 auto 12px;
    border: 3px solid rgba(53, 215, 255, .18);
    border-top-color: var(--gold-2);
    border-radius: 50%;
    animation: collection-spin .8s linear infinite;
}

.collection-error strong {
    display: block;
    color: #ff9d9d;
    margin-bottom: 8px;
}

.collection-error small {
    display: block;
    overflow-wrap: anywhere;
    margin-top: 10px;
    opacity: .72;
}

@keyframes collection-spin {
    to { transform: rotate(360deg); }
}

@keyframes collection-shimmer {
    to { transform: translateX(100%); }
}

@media (max-width: 720px) {
    .collection-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .collection-search {
        min-width: 0;
    }

    .legacy-original-content .collection-card .outfit-header {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .collection-loading::before,
    .legacy-original-content .collection-card .outfit-image::before {
        animation: none;
    }
}
