/* Categories Navigation Styles */
.categories-nav {
    padding: 2rem 0;
    margin-bottom: 2rem;
    animation: slideInFromLeft 1s ease-out 0.5s both;
}

.categories-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-scrollbar: none;
}

.categories-container::-webkit-scrollbar {
    display: none;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    ring-offset-background: transparent;
    transition: all 0.3s ease;
    height: 2.5rem;
    padding: 0 1rem;
    white-space: nowrap;
    font-size: 0.875rem;
    scroll-snap-align: start;
    flex-shrink: 0;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.category-btn:focus-visible {
    outline: none;
    ring: 2px solid #ffca00;
    ring-offset: 2px;
}

.category-btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.category-btn:hover {
    transform: scale(1.05);
}

.category-btn:active {
    transform: scale(0.95);
}

.category-btn.active {
    background: #ffca00;
    color: #000;
}

.category-btn:not(.active) {
    background: transparent;
    color: #cccccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-btn:not(.active):hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

/* Games Grid with Categories */
.games-section-with-categories {
    padding: 0 2rem 2rem;
    transition: all 0.7s ease;
    animation: fadeInSlideUp 1s ease-out 0.7s both;
}

.games-grid-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .games-grid-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .games-grid-categories {
        grid-template-columns: repeat(4, 1fr);
    }
}

.game-card-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
    animation: fadeInSlideUp 0.5s ease-out both;
    display: flex;
    flex-direction: column;
}

.game-card-category:hover {
    transform: scale(1.02);
}

.game-image-container {
    position: relative;
    height: 5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.5s ease;
}

.game-card-category:hover .game-image-container {
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.7s ease;
}

.game-card-category:hover .game-image {
    transform: scale(1.1);
}

.game-price-badge {
    position: absolute;
    top: 0.50rem;
    right: 0.50rem;
    background: #ffca00;
    color: #000;
    font-weight: bold;
    font-size: 1.125rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.game-card-category:hover .game-price-badge {
    transform: scale(1.1);
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.game-card-category:hover .game-overlay {
    opacity: 1;
}

.game-content {
    padding: 1rem;
    transition: all 0.3s ease;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-card-category:hover .game-content {
    transform: translateY(-2px);
}

.game-title-category {
    font-size: 1.25rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.game-card-category:hover .game-title-category {
    color: #ffca00;
}

.game-prize-info {
    color: #ffca00;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.game-card-category:hover .game-prize-info {
    color: #ffb84d;
}

.game-description {
    color: #cccccc;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.game-card-category:hover .game-description {
    color: #e6e6e6;
}

.game-play-btn {
    width: 100%;
    background: #ffca00;
    color: #000;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    margin-top: auto;
}

@media (min-width: 1024px) {
    .game-play-btn {
        font-size: 0.75rem;
    }
    .game-title-category {
        font-size: 1.15rem;
    }
}

.game-play-btn:hover {
    background: #cc9f00;
    transform: scale(1.02);
}

.game-play-btn:active {
    transform: scale(0.98);
}

.game-play-btn .arrow-icon {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.game-play-btn:hover .arrow-icon {
    transform: translateX(0.25rem);
}

/* No games message */
.no-games-message {
    text-align: center;
    color: #cccccc;
    font-size: 1.1rem;
    padding: 2rem;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.loading-message {
    text-align: center;
    color: #ffca00;
    font-size: 1.1rem;
    padding: 2rem;
    margin: 2rem 0;
    background: rgba(255, 202, 0, 0.05);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 202, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.loading-message::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 202, 0, 0.3);
    border-radius: 50%;
    border-top-color: #ffca00;
    animation: spin 1s ease-in-out infinite;
}

/* Animations */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .categories-nav {
        padding: 1rem 0;
    }
    
    .categories-container {
        padding: 0 1rem;
    }
    
    .games-section-with-categories {
        padding: 0 1rem 2rem;
    }
    
    .games-grid-categories {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .game-image-container {
        height: 10rem;
    }
}

@media (max-width: 480px) {
    .category-btn {
        font-size: 0.8rem;
        padding: 0 0.75rem;
        height: 2.25rem;
    }
    
    .game-content {
        padding: 0.75rem;
    }
    
    .game-title-category {
        font-size: 1.1rem;
    }
}