/* Market Specific Styles */

/* Market Header */
.market-header {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 0;
    margin-top: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.market-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #fff;
}

.stat-item i {
    font-size: 1.5rem;
    color: #00d4ff;
}

.stat-label {
    font-size: 0.9rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: #00d4ff;
}

/* Market Categories */
.market-categories {
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.category-tab.active {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: white;
    border-color: #00d4ff;
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3);
}

.category-tab i {
    font-size: 1.2rem;
}

/* Market Content */
.market-content {
    padding: 40px 0 80px;
}

.market-section {
    display: none;
}

.market-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    color: #fff;
}

.section-description {
    color: #ccc;
    font-size: 1.1rem;
    margin-top: 10px;
}

.section-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 10px;
    font-size: 1rem;
}

.filter-select option {
    background: #1a1a2e;
    color: #fff;
}

/* Cases Grid */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.case-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.case-card:hover::before {
    left: 100%;
}

.case-card:hover {
    transform: translateY(-10px);
    border-color: #00d4ff;
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.case-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: #00d4ff;
    border: 2px solid #00d4ff;
}

.case-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.case-description {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.case-rarities {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rarity-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rarity-badge.common {
    background: #4a4a4a;
    color: #fff;
}

.rarity-badge.rare {
    background: #4a90e2;
    color: #fff;
}

.rarity-badge.epic {
    background: #9b59b6;
    color: #fff;
}

.rarity-badge.legendary {
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    color: #fff;
}

.case-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 20px;
    font-family: 'Orbitron', monospace;
}

.case-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-add-cart {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

.btn-buy-now {
    background: transparent;
    color: #00d4ff;
    border: 2px solid #00d4ff;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-buy-now:hover {
    background: #00d4ff;
    color: white;
}

/* Bundles Grid */
.bundles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.bundle-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 0, 150, 0.1));
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bundle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.bundle-card:hover::before {
    transform: translateX(100%);
}

.bundle-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

.bundle-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.bundle-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    font-family: 'Orbitron', monospace;
}

.bundle-description {
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.5;
}

.bundle-items {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.bundle-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #fff;
}

.bundle-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 20px;
    font-family: 'Orbitron', monospace;
}

.bundle-savings {
    color: #00ff88;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Credits Grid */
.credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.credit-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.credit-card:hover {
    transform: translateY(-5px);
    border-color: #00d4ff;
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.2);
}

.credit-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 10px;
    font-family: 'Orbitron', monospace;
}

.credit-bonus {
    color: #00ff88;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.credit-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
}

/* Special Grid */
.special-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.special-card {
    background: linear-gradient(135deg, rgba(255, 0, 150, 0.1), rgba(0, 255, 136, 0.1));
    border: 2px solid rgba(255, 0, 150, 0.3);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.special-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 0, 150, 0.2);
}

.special-timer {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 0, 150, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #1a1a2e;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-header h3 {
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
}

.cart-close {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.cart-close:hover {
    color: #ff4757;
}

.cart-items {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
}

.cart-item-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    color: #fff;
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #00d4ff;
    font-weight: 600;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.cart-item-remove:hover {
    color: #ff6b7a;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.cart-total span:last-child {
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
}

/* Cart Toggle Button */
.cart-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.cart-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.4);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1a1a2e;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ff4757;
}

.modal-body {
    padding: 30px;
}

.purchase-summary {
    margin-bottom: 30px;
}

.purchase-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .market-stats {
        gap: 30px;
    }

    .category-tabs {
        flex-direction: column;
        align-items: center;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .cases-grid,
    .bundles-grid,
    .credits-grid,
    .special-grid {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .cart-toggle {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .case-card,
    .bundle-card,
    .credit-card,
    .special-card {
        padding: 20px;
    }

    .case-image {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .bundle-items {
        flex-direction: column;
        align-items: center;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}
