body {
    overflow-x: hidden;
    overflow-y: auto;
}

.content {
    padding-bottom: 1.25rem;
}

.collection-title {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.nav-link {
    text-decoration: none;
    color: white;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    padding: 0.5rem 0 1rem;
}

.filter-sort-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.4rem;
    padding: 1.5rem;
    background: var(--card-grad);
    border-radius: 20px;
    border: 1px solid var(--card-border-strong);
    box-shadow: var(--card-shadow);
}

.filter-section, .sort-section {
    flex: 1;
}

.filter-section h3, .sort-section h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    font-weight: bold;
}

.filter-options {
    display: flex;
    gap: 1rem;
}

.filter-select {
    flex: 1;
    background: var(--card-grad);
    border: 1px solid var(--card-border-strong);
    color: white;
    padding: 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: border-color 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.filter-select:hover {
    border-color: #f97316;
}

.filter-select:focus {
    outline: none;
    border-color: #f97316;
    background: var(--card-grad-hover);
}

.card {
    background: var(--card-grad);
    border-radius: 20px;
    padding: 0.8rem;
    text-align: center;
    border: 1px solid var(--card-border-strong);
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.42);
    background: var(--card-grad-hover);
}

.card-level-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #f97316, #dc2626);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 5;
}

.card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 0.6rem;
    background: rgba(0,0,0,0.2);
}

.card-name {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.card-rarity {
    font-size: 0.72rem;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

.card-cps {
    font-size: 0.78rem;
    color: #facc15;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.card.locked {
    filter: grayscale(100%) brightness(40%);
    pointer-events: none;
}

.card.locked .card-name,
.card.locked .card-rarity,
.card.locked .card-cps {
    filter: blur(5px);
    user-select: none;
}

.locked-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    color: white;
}

@media (max-width: 900px) {
    .collection-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .collection-title {
        margin-bottom: 1.2rem;
        font-size: 1.6rem;
    }

    .filter-sort-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .filter-options {
        flex-direction: column;
        gap: 0.75rem;
    }

    .sort-section .filter-select {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .collection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
