/* Games Block Styles */
.games-section {
    margin: 40px 0;
    padding: 0 20px;
}

.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.games-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.games-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.games-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.games-controls .games-filters {
    margin-bottom: 0;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--accent-color);
    background: transparent;
    color: #fff;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
}

.view-all-btn {
    padding: 12px 24px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.view-all-btn:hover {
    background: #e6b800;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.games-grid .game-image {
    width: 100%;
    transition: transform 0.3s ease;
}

.games-grid .game-card:hover .game-image {
    transform: scale(1.05);
}

.games-grid .game-card {
    position: relative;
    overflow: hidden;
}

.games-grid .game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.games-grid .game-card:hover .game-overlay {
    opacity: 1;
}

.games-grid .play-btn {
    padding: 12px 24px;
    background: #fff;
    color: #288D6A;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.games-grid .play-btn:hover {
    background: #288D6A;
    color: #fff;
    transform: scale(1.05);
}

.games-grid .game-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.games-grid .game-card i {
    font-size:14px;
    margin-bottom: 0;
}

.games-grid .game-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 0;
}

.games-grid .game-type {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 0;
}

.games-grid .game-badges {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.games-grid .game-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.games-grid .badge-popular {
    background: #ff6b6b;
    color: white;
}

.games-grid .badge-new {
    background: #4ecdc4;
    color: white;
}

.games-grid .badge-hot {
    background: #ff9f43;
    color: white;
}

.games-grid .game-type-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.games-grid .game-time {
    font-size: 0.8rem;
    color: #fff;
    margin-bottom: 0;
}

/* Sorting and Filtering */
.sorting-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 8px 16px;
    border: 1px solid #fff;
    background: transparent;
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.sort-btn:hover,
.sort-btn.active {
    border-color: #fff;
    color: #288D6A;
    background: #fff;
}

.theme-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.theme-btn {
    padding: 6px 12px;
    border: 1px solid #fff;
    background: transparent;
    color: #fff;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.theme-btn:hover,
.theme-btn.active {
    border-color: #fff;
    color: #288D6A;
    background: #fff;
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    color: white;
}

/* CTA Buttons */
.games-cta {
    text-align: center;
    margin: 40px 0;
}

.cta-btn {
    padding: 15px 30px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-btn:hover {
    background: #e6b800;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.4);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .games-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .games-title {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    
    .games-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .games-filters {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .games-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
}

/* Lazy Loading */
.game-image[data-src] {
    background: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Loading State */
.games-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.games-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
