/* Game Grid Styles - Enhanced for WebP support */

/* Base styles for game grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

/* Game card hover effects */
.game-card-category.hover-effect {
    transition: all 0.3s ease;
    position: relative;
}

.game-card-category.hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.game-card-category.scale-up {
    transform: scale(1.03);
}

.game-card-category.clicked {
    transform: scale(0.98);
    transition: transform 0.2s ease;
}

/* Improve image display */
.game-card-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card-category:hover .game-card-image img {
    transform: scale(1.05);
}

/* Add loading animation for images */
.game-card-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
    z-index: 1;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Fade in image when loaded */
.game-card-image img[src] {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Enhanced online counter animation */
.online-count .counter-updated {
    animation: pulse 1s ease;
}

@keyframes pulse {
    0% { color: var(--accent-color); }
    50% { color: #ffffff; }
    100% { color: var(--accent-color); }
}

/* Live games section enhancements */
.live-games-section {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeInUp 0.5s ease;
}

.live-games-icon {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.live-games-update {
    font-size: 0.8em;
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .game-title {
        font-size: 0.9em;
    }
    
    .online-count {
        font-size: 0.8em;
    }
}