/* Collection View Styles - Premium Redesign */
#collection-view {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: radial-gradient(circle at 50% 20%, #1f2333, #0d1017);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        visibility 0.5s;
    overflow: hidden;
    padding-bottom: 110px;
}

#collection-view.is-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.collection-header {
    padding: 40px 24px 20px;
    background: rgba(22, 25, 34, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.collection-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.collection-tabs {
    display: flex;
    gap: 12px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.collection-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.collection-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.collection-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30%;
    right: 30%;
    height: 2px;
    background: #ff7a1a;
    box-shadow: 0 0 10px #ff7a1a;
    border-radius: 2px;
}

.collection-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scroll-behavior: smooth;
}

.collection-section {
    display: none;
    animation: slideUpFade 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.collection-section.active {
    display: block;
}

.collection-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    margin-bottom: 24px;
}

.summary-item {
    text-align: center;
}

.summary-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    display: block;
}

.summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.tracks-grid, .achievements-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.track-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
    transition: all 0.3s ease;
}

.track-card.completed {
    border-color: rgba(255, 176, 102, 0.3);
}

.track-cover {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.completed-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 122, 26, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.track-card.completed .completed-overlay {
    opacity: 1;
}

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

.track-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 2px 0 8px;
}

.track-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    align-items: center;
    margin-bottom: 8px;
}

.track-rarity {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.track-progress-container {
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.track-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffaf7a, #ff7a1a);
    box-shadow: 0 0 8px rgba(255, 122, 26, 0.5);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.track-progress-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
}

.artifacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.artifact-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 16px;
    text-align: center;
}

.artifact-image-container {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    position: relative;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.4));
}

.artifact-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.artifact-count {
    position: absolute;
    top: -4px;
    right: -8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
}

.artifact-info {
    min-width: 0;
}

.artifact-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.artifact-rarity {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.artifact-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.achievement-card {
    display: flex;
    gap: 16px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 16px;
    transition: all 0.3s ease;
}

.achievement-card.locked {
    opacity: 0.6;
    filter: grayscale(50%);
}

.achievement-card.unlocked {
    background: linear-gradient(90deg, rgba(255, 176, 102, 0.1), rgba(255, 255, 255, 0.03));
    border-color: rgba(255, 176, 102, 0.2);
}

.achievement-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.achievement-card.unlocked .achievement-icon {
    background: linear-gradient(135deg, #ffb066, #ff7a1a);
    color: #000;
}

.achievement-info {
    flex-grow: 1;
    min-width: 0;
}

.achievement-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.achievement-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 4px 0 8px;
}

.achievement-reward {
    font-size: 12px;
    font-weight: 700;
    color: #fbd38d;
    white-space: nowrap;
}

.achievement-reward.claimed {
    color: #0f7;
    text-shadow: 0 0 8px rgba(0, 255, 119, 0.5);
}

.achievement-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar-bg {
    flex-grow: 1;
    height: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ffaf7a, #ff7a1a);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}
.empty-state .empty-icon {
    font-size: 48px;
    opacity: 0.5;
    margin-bottom: 16px;
}
.empty-state .empty-text strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.empty-state .empty-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.rarity-common { background: rgba(255,255,255,0.1); color: #ccc; }
.rarity-rare { background: rgba(66,153,225,0.2); color: #63b3ed; }
.rarity-epic { background: rgba(159,122,234,0.2); color: #b794f4; }
.rarity-legendary { background: rgba(246,173,85,0.2); color: #fbd38d; }