/* Collection Page Styles */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Collection Header */
.collection-header {
    padding: 10rem 2rem 4rem;
    text-align: center;
}

.header-content {
    animation: fadeInUp 1s ease-out;
}

.collection-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.collection-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.collection-stats {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.stat-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stat-badge svg {
    color: var(--primary-red);
}

/* Filter Section */
.filter-section {
    padding: 0 2rem 3rem;
    position: sticky;
    top: 80px;
    z-index: 100;
    background: linear-gradient(180deg, var(--primary-dark) 0%, rgba(15, 20, 25, 0.95) 100%);
    backdrop-filter: blur(20px);
}

.filter-bar {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
}

.search-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(255, 70, 85, 0.1);
}

.search-box svg {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.filter-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-red) 0%, #C5303E 100%);
    border-color: var(--primary-red);
    color: white;
}

.filter-btn svg {
    width: 18px;
    height: 18px;
}

.filter-btn .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.filter-btn.active .count {
    background: rgba(255, 255, 255, 0.25);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.35rem;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--primary-red);
    color: white;
}

/* Collection Grid */
.collection-section {
    padding: 2rem;
    min-height: 60vh;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.8s ease-out;
}

.collection-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out both;
}

.collection-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                rgba(255, 70, 85, 0.1) 0%, 
                transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.collection-item:hover::before {
    opacity: 1;
}

.collection-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.item-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    margin-bottom: 1.25rem;
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    padding: 1rem;
}

.collection-item:hover .item-image {
    transform: scale(1.05);
}

.favorite-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.favorite-badge:hover {
    background: rgba(0, 0, 0, 0.8);
    color: var(--accent-gold);
    transform: scale(1.1);
    border-color: var(--accent-gold);
}

.favorite-badge.active {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #FFA500 100%);
    color: white;
    border-color: var(--accent-gold);
}

.favorite-badge.active svg {
    fill: white;
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.item-info {
    flex: 1;
}

.item-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.item-author {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 70, 85, 0.15);
    border: 1px solid rgba(255, 70, 85, 0.3);
    border-radius: 6px;
    color: var(--primary-red);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    flex: 1;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, #C5303E 100%);
    border-color: var(--primary-red);
    color: white;
}

.action-btn.primary:hover {
    box-shadow: 0 8px 25px rgba(255, 70, 85, 0.4);
    transform: translateY(-2px);
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-green);
    border-radius: 12px;
    color: var(--accent-green);
    font-weight: 600;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.3);
    transform: translateX(400px);
    transition: transform 0.4s ease;
    z-index: 10000;
}

.copy-notification.show {
    transform: translateX(0);
}

.copy-notification svg {
    color: var(--accent-green);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    max-width: 1100px;
    width: 90%;
    max-height: 90vh;
    background: var(--secondary-dark);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--primary-red);
    color: var(--primary-red);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2rem;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.modal-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.favorite-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-gold);
    border-color: var(--accent-gold);
    transform: scale(1.1);
}

.favorite-btn.active {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #FFA500 100%);
    color: white;
    border-color: var(--accent-gold);
}

.favorite-btn.active svg {
    fill: white;
}

.modal-author {
    display: flex;
    gap: 0.75rem;
}

.author-badge {
    padding: 0.5rem 1rem;
    background: rgba(255, 70, 85, 0.15);
    border: 1px solid rgba(255, 70, 85, 0.3);
    border-radius: 8px;
    color: var(--primary-red);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.code-section label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-box {
    display: flex;
    gap: 0.75rem;
}

.code-box input {
    flex: 1;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    outline: none;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.usage-guide {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.usage-guide h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.usage-guide ol {
    list-style: none;
    counter-reset: step-counter;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.usage-guide ol li {
    counter-increment: step-counter;
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.usage-guide ol li::before {
    content: counter(step-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-red) 0%, #C5303E 100%);
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-btn {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 968px) {
    .collection-title {
        font-size: 3rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        width: 100%;
    }

    .filter-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .filter-btn {
        flex: 1;
    }

    .modal-body {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 640px) {
    .collection-header {
        padding: 8rem 2rem 3rem;
    }

    .collection-title {
        font-size: 2.5rem;
    }

    .collection-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    .copy-notification {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
    }

    .modal-content {
        width: 95%;
    }

    .modal-actions {
        flex-direction: column;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.collection-item.loading {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0px,
        rgba(255, 255, 255, 0.08) 40px,
        rgba(255, 255, 255, 0.03) 80px
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 1.1rem;
}

/* Active nav link */
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    width: 100%;
}
