/* Resource Packs Page Specific Styles */

/* Pack Card Styles */
.pack-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.pack-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.pack-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pack-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pack-image i {
    font-size: 3rem;
    color: var(--text-muted);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pack-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.pack-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.pack-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.pack-version {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.pack-style {
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.pack-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

.download-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.download-btn i {
    font-size: 1rem;
}

.preview-btn {
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.preview-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Pack Grid Layout */
.packs-section {
    padding: 2rem 0;
}

.packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Pack Tags */
.pack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pack-tag {
    background: var(--bg-secondary);
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.pack-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Pack Features */
.pack-features {
    margin-bottom: 1rem;
}

.pack-features h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.pack-features h4::before {
    content: '✨';
    position: absolute;
    left: 0;
    top: 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.feature-item i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.feature-item:last-child {
    margin-bottom: 0;
}

/* Pack Code Badge */
.pack-code {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    z-index: 10;
}

/* Pack Resolution and Size Badges */
.pack-resolution {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 10;
}

.pack-size {
    position: absolute;
    top: 3rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 10;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.empty-state p {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Preview Modal */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.preview-modal.active {
    opacity: 1;
    visibility: visible;
}

.preview-content {
    background: var(--card-bg);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.preview-modal.active .preview-content {
    transform: scale(1);
}

.preview-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.preview-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-close:hover {
    background: var(--bg-secondary);
    color: var(--text-color);
}

.preview-body {
    padding: 1.5rem;
}

.preview-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.preview-image {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: transform 0.3s ease;
}

.preview-image:hover {
    transform: scale(1.05);
}

.preview-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.preview-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.preview-description {
    margin-bottom: 1.5rem;
}

.preview-actions {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .packs-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }

    .pack-actions {
        flex-direction: column;
    }

    .pack-meta {
        justify-content: center;
    }

    .preview-gallery {
        grid-template-columns: 1fr;
    }

    .preview-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .pack-card {
        min-height: 450px;
        padding: 1rem;
    }

    .pack-image {
        height: 150px;
    }

    .pack-title {
        font-size: 1.1rem;
    }

    .pack-description {
        font-size: 0.85rem;
    }

    .preview-content {
        width: 95%;
        margin: 1rem;
    }

    .preview-header {
        padding: 1rem;
    }

    .preview-body {
        padding: 1rem;
    }
}

/* Animation Classes */
.pack-card.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.pack-card.slide-in {
    animation: slideIn 0.6s ease-out;
}

.pack-card.scale {
    animation: scaleIn 0.4s ease-out;
}

/* Hover Effects */
.pack-card:hover .pack-image {
    transform: scale(1.05);
}

.pack-card:hover .pack-title {
    color: var(--primary-color);
}

/* Download Button States */
.download-btn:active {
    transform: translateY(0);
}

.download-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.download-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 1rem;
}

.download-btn.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.download-btn.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Special Card Effects */
.pack-card.high-res {
    border-color: var(--secondary-color);
}

.pack-card.high-res:hover {
    border-color: var(--primary-color);
}

.pack-card.pbr {
    border-color: var(--primary-color);
}

.pack-card.pbr:hover {
    border-color: var(--secondary-color);
}

/* Pulse glow animation for new badges */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 3px 8px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 3px 12px rgba(99, 102, 241, 0.6);
    }
}

.stat-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}