/* Market Container */
.market-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Market Categories */
.market-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.category-item.active {
    background: #4a90e2;
    color: #fff;
}

/* Market Sections */
.market-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.market-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* VIP Packages */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.package-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.package-header {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.package-header img {
    width: 140px;
    height: 140px;
    margin-bottom: 1.5rem;
    object-fit: contain;
    transition: all 0.3s ease;
}

.coin-icon {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.coin-icon:hover {
    transform: scale(1.1) translateY(-5px);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

.crate-icon {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.crate-icon:hover {
    transform: scale(1.1) rotate(5deg) translateY(-5px);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

.package-header h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Standardized price display for all sections */
.price {
    color: #4a90e2;
    font-weight: bold;
    font-size: 1.25rem;
    display: inline-block;
    padding: 0.7rem 2rem;
    background: #EBF5FF;
    border-radius: 30px;
    margin: 1rem 0 1.5rem 0;
    min-width: 150px;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.package-features li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    color: #555;
    font-size: 1.1rem;
}

.package-features i {
    color: #4a90e2;
    font-size: 1.2rem;
}

/* VIP Package Colors */
.vip {
    border-color: #4a90e2;
}

.vip-plus {
    border-color: #2ecc71;
}

.mvip {
    border-color: #f1c40f;
}

.mvip-plus {
    border-color: #e74c3c;
}

.avip-plus {
    position: relative;
    border-width: 3px;
    overflow: hidden;
}

/* RGB Effect only for AVIP+ */
.avip-plus.rgb {
    animation: rgb-border 3s infinite, rgb-glow 3s infinite;
}

@keyframes rgb-border {
    0% { border-color: #ff0000; }
    33% { border-color: #00ff00; }
    66% { border-color: #0000ff; }
    100% { border-color: #ff0000; }
}

@keyframes rgb-glow {
    0% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.3); }
    33% { box-shadow: 0 0 20px rgba(0, 255, 0, 0.3); }
    66% { box-shadow: 0 0 20px rgba(0, 0, 255, 0.3); }
    100% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.3); }
}

/* Game Items */
.game-category {
    margin-bottom: 3rem;
}

.game-category h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 320px;
    overflow: visible;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.item-card img {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.item-card i {
    color: #4a90e2;
    margin-bottom: 1.5rem;
    display: block;
    font-size: 3.5rem;
}

.item-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: bold;
}

.item-card p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.item-card .buy-button {
    margin-top: auto;
    width: 100%;
    max-width: 280px;
}

/* Buy Button */
.buy-button {
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.buy-button:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .market-categories {
        flex-direction: column;
    }

    .category-item {
        width: 100%;
        justify-content: center;
    }

    .packages-grid {
        grid-template-columns: 1fr;
    }

    .items-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.market-container > * {
    animation: fadeIn 0.3s ease-out;
}

/* Market Header */
.market-header {
    text-align: center;
    padding: 60px 20px;
    background: var(--gradient);
    color: var(--text-light);
}

.market-header h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.market-header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to right, 
        transparent,
        rgba(74, 144, 226, 0.05),
        rgba(74, 144, 226, 0.05),
        transparent
    );
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, 
        rgba(74, 144, 226, 0.5), 
        rgba(100, 181, 246, 0.5)
    );
    border-radius: 50px;
    box-shadow: 
        inset 0 0 6px rgba(0, 0, 0, 0.1),
        inset 0 0 2px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, 
        rgba(74, 144, 226, 0.8), 
        rgba(100, 181, 246, 0.8)
    );
    box-shadow: 
        inset 0 0 8px rgba(0, 0, 0, 0.2),
        inset 0 0 3px rgba(255, 255, 255, 0.4),
        0 0 8px rgba(74, 144, 226, 0.3);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 144, 226, 0.5) transparent;
}