/* ============================================
   SPOTIFLY MARKETPLACE STYLES
   ============================================ */

/* Page Layout */
.marketplace-page {
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Header */
.marketplace-header {
    padding: 100px 40px 40px;
    text-align: center;
}

.marketplace-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--fly-green), var(--fly-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.marketplace-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    padding: 20px 40px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.stats-bar .stat-item {
    text-align: center;
}

.stats-bar .stat-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--fly-green);
    font-weight: 700;
}

.stats-bar .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Controls */
.marketplace-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 25px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.filter-btn:hover {
    border-color: var(--fly-green);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--fly-green);
    color: var(--bg-dark);
    border-color: var(--fly-green);
}

.sort-group select {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
}

.sort-group select:focus {
    outline: none;
    border-color: var(--fly-green);
}

/* NFT Gallery Grid */
.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* NFT Card */
.nft-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nft-card:hover {
    transform: translateY(-8px);
    border-color: var(--fly-purple);
    box-shadow: 0 20px 40px rgba(191, 0, 255, 0.2);
}

.nft-card.for-sale {
    border-color: rgba(57, 255, 20, 0.3);
}

.nft-card.for-sale:hover {
    border-color: var(--fly-green);
    box-shadow: 0 20px 40px rgba(57, 255, 20, 0.2);
}

.nft-serial {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 12px;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    color: var(--fly-cyan);
    z-index: 2;
    backdrop-filter: blur(10px);
}

.nft-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
}

.nft-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nft-card:hover .nft-image {
    transform: scale(1.05);
}

.nft-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nft-card:hover .nft-overlay {
    opacity: 1;
}

.preview-btn {
    padding: 12px 24px;
    background: var(--fly-green);
    border: none;
    border-radius: 30px;
    color: var(--bg-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}

.nft-details {
    padding: 16px;
}

.nft-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nft-artist {
    color: var(--fly-cyan);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.nft-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.nft-price {
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.1), rgba(0, 255, 255, 0.1));
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 12px;
}

.price-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: var(--fly-green);
    font-weight: 700;
}

.price-unit {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.nft-status.not-listed {
    padding: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.nft-actions {
    display: flex;
    gap: 10px;
}

.buy-btn, .view-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.buy-btn {
    background: linear-gradient(135deg, var(--fly-green), var(--fly-cyan));
    color: var(--bg-dark);
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(57, 255, 20, 0.3);
}

.view-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--fly-purple);
}

/* Empty/Loading States */
.loading-state, .empty-state, .error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--fly-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state .cta-btn {
    display: inline-block;
    padding: 14px 30px;
    background: var(--fly-green);
    color: var(--bg-dark);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.empty-state .cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(57, 255, 20, 0.3);
}

/* NFT Detail Modal */
.nft-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nft-modal.active {
    opacity: 1;
    visibility: visible;
}

.nft-modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.nft-modal .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.nft-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Detail Grid */
.nft-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

@media (max-width: 768px) {
    .nft-detail-grid {
        grid-template-columns: 1fr;
    }
}

.nft-detail-media {
    position: relative;
}

.nft-detail-image {
    width: 100%;
    border-radius: 16px;
}

.nft-audio-preview {
    margin-top: 16px;
    text-align: center;
}

.play-preview-btn {
    padding: 14px 30px;
    background: var(--bg-card);
    border: 1px solid var(--fly-green);
    border-radius: 30px;
    color: var(--fly-green);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-preview-btn:hover {
    background: var(--fly-green);
    color: var(--bg-dark);
}

.nft-detail-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nft-detail-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: black;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    width: fit-content;
}

.nft-detail-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
}

.nft-detail-artist {
    color: var(--fly-cyan);
    font-size: 1.1rem;
}

.nft-detail-stats {
    display: flex;
    gap: 20px;
}

.detail-stat {
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: 10px;
    text-align: center;
}

.detail-stat .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.detail-stat .value {
    font-weight: 600;
}

.nft-ownership {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 12px;
}

.owner-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.owner-row:last-child {
    border-bottom: none;
}

.owner-row .label {
    color: var(--text-muted);
}

.owner-row .value {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--fly-cyan);
}

/* Price Section */
.nft-price-section {
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.1), rgba(0, 255, 255, 0.05));
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(57, 255, 20, 0.3);
}

.current-price {
    text-align: center;
    margin-bottom: 16px;
}

.price-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.price-amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--fly-green);
    font-weight: 700;
}

.buy-now-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--fly-green), var(--fly-cyan));
    border: none;
    border-radius: 12px;
    color: var(--bg-dark);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-now-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(57, 255, 20, 0.4);
}

.cancel-listing-btn {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--fly-pink);
    border-radius: 12px;
    color: var(--fly-pink);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-listing-btn:hover {
    background: rgba(255, 0, 110, 0.1);
}

.nft-not-for-sale {
    text-align: center;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 12px;
}

.nft-not-for-sale p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.list-btn {
    padding: 14px 30px;
    background: linear-gradient(135deg, var(--fly-purple), var(--fly-pink));
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.list-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(191, 0, 255, 0.3);
}

.nft-links {
    text-align: center;
}

.hashscan-link {
    color: var(--fly-cyan);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.hashscan-link:hover {
    color: var(--fly-green);
}

/* Responsive */
@media (max-width: 768px) {
    .marketplace-header {
        padding: 80px 20px 30px;
    }
    
    .marketplace-hero h1 {
        font-size: 1.8rem;
    }
    
    .stats-bar {
        flex-wrap: wrap;
        gap: 20px;
        padding: 16px 20px;
    }
    
    .stats-bar .stat-item {
        flex: 1 1 40%;
    }
    
    .marketplace-controls {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }
    
    .filter-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .marketplace-grid {
        padding: 16px 20px;
        gap: 16px;
    }
    
    .nft-detail-grid {
        padding: 20px;
        gap: 20px;
    }
}
