/* Marketplace Styles */

/* Header */
.marketplace-header {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--dark-purple), var(--medium-purple));
    border-bottom: 2px solid var(--border-gold);
}

.page-title {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.page-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.marketplace-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-gold);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-gold);
}

.stat-value {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-gold);
    font-family: 'Cinzel', serif;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filters */
.marketplace-filters {
    padding: 3rem 0;
    background: var(--medium-purple);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: 30px;
    border: 2px solid var(--border-gold);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-gold);
    color: var(--text-light);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(45deg, var(--primary-gold), var(--secondary-gold));
    color: #000;
}

.filters-advanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-gold);
    border-radius: 15px;
    padding: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.filter-select {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-gold);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.price-range {
    padding: 1rem 0;
}

.price-slider {
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: rgba(255, 215, 0, 0.3);
    outline: none;
    -webkit-appearance: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-gold);
    cursor: pointer;
}

.price-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.btn-filter-apply {
    align-self: end;
    background: transparent;
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
}

/* NFT Grid */
.marketplace-grid {
    padding: 4rem 0;
}

.nfts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.nft-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-gold);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nft-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary-gold);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
}

.nft-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.nft-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.nft-item:hover .nft-image img {
    transform: scale(1.1);
}

.nft-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}

.nft-badge.legendary {
    background: linear-gradient(45deg, #ff0080, #ff8c00);
}

.nft-badge.epic {
    background: linear-gradient(45deg, #9d00ff, #4a00e0);
}

.nft-badge.rare {
    background: linear-gradient(45deg, #00b4ff, #0080ff);
}

.auction-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--royal-red);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nft-actions {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.nft-item:hover .nft-actions {
    opacity: 1;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.action-btn:hover {
    background: var(--primary-gold);
    color: #000;
}

.action-btn.favorite:hover {
    background: #ff4757;
}

.nft-details {
    padding: 1.5rem;
}

.nft-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.nft-name {
    font-size: 1.3rem;
    margin: 0;
}

.collection-badge {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-gold);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nft-description {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.nft-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--text-gray);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.stat-value {
    display: block;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-gold);
}

.nft-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.price-info {
    flex: 1;
}

.current-price {
    margin-bottom: 0.5rem;
}

.price-label {
    display: block;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.price-amount {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-gold);
}

.owner-info {
    font-size: 0.9rem;
}

.owner-label {
    color: var(--text-gray);
    margin-right: 5px;
}

.owner-name {
    color: var(--primary-gold);
    font-weight: bold;
}

.auction-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--royal-red);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.btn-buy,
.btn-bid {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
}

.btn-buy {
    background: linear-gradient(45deg, var(--primary-gold), var(--secondary-gold));
    color: #000;
}

.btn-bid {
    background: var(--royal-red);
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-gold);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.page-btn:hover:not(.disabled),
.page-btn.active {
    background: var(--primary-gold);
    color: #000;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    color: var(--text-gray);
    padding: 0 0.5rem;
}

/* Sell NFT Section */
.sell-nft-section {
    padding: 4rem 0;
    background: var(--medium-purple);
    border-top: 2px solid var(--border-gold);
    border-bottom: 2px solid var(--border-gold);
}

.sell-nft-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(65, 105, 225, 0.1));
    border: 2px solid var(--border-gold);
    border-radius: 20px;
    padding: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.sell-nft-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-gold);
}

.sell-nft-content p {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn-sell {
    background: linear-gradient(45deg, var(--primary-gold), var(--secondary-gold));
    color: #000;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.sell-nft-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Responsive Marketplace */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .nfts-container {
        grid-template-columns: 1fr;
    }
    
    .sell-nft-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .nft-stats {
        grid-template-columns: 1fr;
    }
    
    .nft-price-section {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .btn-buy,
    .btn-bid {
        width: 100%;
    }
}